Skip to content

Introduce PHPBench and move performance tests from AnalyserIntegrationTest to RegressionBench#5200

Merged
ondrejmirtes merged 30 commits into2.1.xfrom
claude/add-test-comments-1vopL
Mar 11, 2026
Merged

Introduce PHPBench and move performance tests from AnalyserIntegrationTest to RegressionBench#5200
ondrejmirtes merged 30 commits into2.1.xfrom
claude/add-test-comments-1vopL

Conversation

@ondrejmirtes
Copy link
Member

Each testBug method now has a comment on its first line describing
the nature of the original issue: crash, performance, infinite run,
false positive, or false negative.

https://claude.ai/code/session_017EKgzxmzYFa1qUT8bcuohj

@phpstan-bot
Copy link
Collaborator

You've opened the pull request against the latest branch 2.2.x. PHPStan 2.2 is not going to be released for months. If your code is relevant on 2.1.x and you want it to be released sooner, please rebase your pull request and change its target to 2.1.x.

@ondrejmirtes ondrejmirtes changed the base branch from 2.2.x to 2.1.x March 11, 2026 06:05
@ondrejmirtes ondrejmirtes changed the title Add issue category comments to AnalyserIntegrationTest bug methods Introduce PHPBench and move performance tests from AnalyserIntegrationTest to RegressionBench Mar 11, 2026
Comment on lines +73 to +74
- name: "Checkout"
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

Check warning

Code scanning / zizmor

credential persistence through GitHub Actions artifacts Warning

credential persistence through GitHub Actions artifacts
phpbench.json Outdated
Comment on lines +2 to +6
"$schema":"./vendor/phpbench/phpbench/phpbench.schema.json",
"runner.bootstrap": "vendor/autoload.php",
"runner.path": "tests/bench",
"runner.file_pattern": "*Bench.php",
"storage.xml_storage_path": "tests/bench/storage"
Copy link
Contributor

@staabm staabm Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mix of tabs and spaces

@ondrejmirtes ondrejmirtes force-pushed the claude/add-test-comments-1vopL branch from 7dbfe21 to f3bf719 Compare March 11, 2026 07:24
Comment on lines +35 to +36
- name: "Checkout base branch"
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

Check warning

Code scanning / zizmor

credential persistence through GitHub Actions artifacts Warning

credential persistence through GitHub Actions artifacts
@ondrejmirtes ondrejmirtes force-pushed the claude/add-test-comments-1vopL branch from f3bf719 to a029b04 Compare March 11, 2026 07:37
ini-file: development
ini-values: memory_limit=-1

- uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # v3

Check warning

Code scanning / zizmor

detects commit SHAs that don't match their version comment tags Warning

detects commit SHAs that don't match their version comment tags
ini-values: memory_limit=-1

- uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # v3
- uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # v3

Check warning

Code scanning / zizmor

detects commit SHAs that don't match their version comment tags Warning

detects commit SHAs that don't match their version comment tags
ini-file: development
ini-values: memory_limit=-1

- uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # v3

Check warning

Code scanning / zizmor

detects commit SHAs that don't match their version comment tags Warning

detects commit SHAs that don't match their version comment tags
ini-values: memory_limit=-1

- uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # v3
- uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # v3

Check warning

Code scanning / zizmor

detects commit SHAs that don't match their version comment tags Warning

detects commit SHAs that don't match their version comment tags
@ondrejmirtes ondrejmirtes force-pushed the claude/add-test-comments-1vopL branch from bf0e688 to c058fb3 Compare March 11, 2026 08:26
claude and others added 18 commits March 11, 2026 09:47
Each testBug method now has a comment on its first line describing
the nature of the original issue: crash, performance, infinite run,
false positive, or false negative.

https://claude.ai/code/session_017EKgzxmzYFa1qUT8bcuohj
Extract shared container/config infrastructure from PHPStanTestCase into
PHPStanTestCaseTrait so it can be reused by both PHPUnit tests and phpbench
benchmarks without duplication. Add AbstractBenchCase with runAnalyse method
for writing performance benchmarks.

https://claude.ai/code/session_017EKgzxmzYFa1qUT8bcuohj
…sts/bench/

The $container variable in the bootstrap closure is used by bootstrap files
at runtime. Moved AbstractBenchCase from tests/PHPStan/Benchmark/ to
tests/bench/ and updated composer.json classmap accordingly.

https://claude.ai/code/session_017EKgzxmzYFa1qUT8bcuohj
Move 32 performance regression tests from AnalyserIntegrationTest to a new
RegressionBench class using phpbench. Test data files moved to tests/bench/data/.
This separates performance benchmarks from functional integration tests.

https://claude.ai/code/session_017EKgzxmzYFa1qUT8bcuohj
phpbench stores local benchmark results in .phpbench/ which are
machine-specific and should not be committed.

https://claude.ai/code/session_017EKgzxmzYFa1qUT8bcuohj
@ondrejmirtes ondrejmirtes force-pushed the claude/add-test-comments-1vopL branch from 25b48ba to 753fecf Compare March 11, 2026 08:48
@ondrejmirtes ondrejmirtes merged commit 4e70fc6 into 2.1.x Mar 11, 2026
18 of 28 checks passed
@ondrejmirtes ondrejmirtes deleted the claude/add-test-comments-1vopL branch March 11, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants