Skip to content

[CI] Run the test suite with PHPStan Turbo - #8848

Closed
SanderMuller wants to merge 1 commit into
rectorphp:mainfrom
SanderMuller:turbo-in-tests
Closed

SanderMuller wants to merge 1 commit into
rectorphp:mainfrom
SanderMuller:turbo-in-tests

Conversation

@SanderMuller

Copy link
Copy Markdown
Contributor

The tests job now loads PHPStan Turbo from php.ini. Every PHP process of the suite gets it: the fast-unit workers, the separate-process test and the bin/rector runs in tests/Bin.

tests/bootstrap.php activates Turbo before preload.php when the extension is loaded. Without the extension, nothing changes, so local runs work as before.

Measured on my fork with this php.ini step, 5 interleaved rounds per job, medians (https://github.com/SanderMuller/rector-src/actions/runs/40309968255):

ubuntu-latest wall without / with Turbo CPU without / with Turbo
PHP 8.4 15.6 s / 13.5 s 35.9 s / 26.9 s
PHP 8.5 20.0 s / 17.0 s 52.1 s / 39.8 s

All runs passed, and Turbo was active in every test process.

The tests job loads the PHPStan Turbo extension from php.ini, so the
fastunit workers and the processes that the tests start all get it.
tests/bootstrap.php activates Turbo before preload.php when the
extension is loaded. Without the extension nothing changes.
@TomasVotruba

Copy link
Copy Markdown
Member

Thanks for suggestion. I'd prefer to keep tests as simple as possible, for maintenance and decoupling.

@SanderMuller
SanderMuller deleted the turbo-in-tests branch October 26, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants