php / php/php-src

PHPT test runner improvements

Open
#16,623 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Category: Tests Feature Status: Needs Triage
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

Recently I have added a optimization to the PHPUnit PHPT testrunner (which was initially copied from run-tests.php) to avoid subprocess overhead when evaluating side-effect free —SKIPIF— conditions.

the implementation is in https://github.com/sebastianbergmann/phpunit/pull/5998
and I blogged about it (and other optimizations) in https://staabm.github.io/2024/10/19/phpunit-codesprint-munich.html

symfony reported a 9% perf improvement of their PHPT tests in https://github.com/symfony/symfony/pull/58680#issuecomment-2441035323

is this something which would be worth adding into run-tests.php ?
(It would require some code of my tiny lib https://github.com/staabm/side-effects-detector)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with run-tests.php and compare its PHPT test-runner flow with the implementation in the linked PHPUnit pull request. Review the side-effects-detector library to understand the referenced dependency and determine whether its approach fits this runner. Done means a decided scope for adding the optimization, with any required tests and performance evidence identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.