Makefile: added phpbench target#5250
Merged
staabm merged 8 commits intophpstan:2.1.xfrom Mar 19, 2026
Merged
Conversation
allow running the benchmark locally
|
|
||
| .PHONY: phpbench | ||
| phpbench: | ||
| composer require --dev phpbench/phpbench:^1.2.15 |
Contributor
There was a problem hiding this comment.
Why not always adding it as dev dependency ?
Contributor
Author
There was a problem hiding this comment.
I guess ondrej did it that way because PHP version support for 7.2 in CI would not work.
Member
There was a problem hiding this comment.
phpbench is already a dependency in tests/composer.json. No need to add it here.
VincentLanglet
approved these changes
Mar 19, 2026
|
|
||
| .PHONY: phpbench-baseline | ||
| phpbench-baseline: | ||
| composer require --dev phpbench/phpbench:^1.2.15 -q |
Member
There was a problem hiding this comment.
This should not be here. Use the phpbench from tests/.
phpstan-bot
pushed a commit
to phpstan-bot/phpstan-src
that referenced
this pull request
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
allow running the benchmark locally.
this seems useful, as I recently got 'red' benchmark github action jobs, and want to verify/reproduce locally
adds 2 new makefile targets
make phpbench-baseline(re)-generates the baselinemake phpbenchverifies a recent enough baseline exists and runs the tests, compares them against the baselineto achieve this we add the phpbench composer dependency at the start and later on remove it again.