Skip to content

Fix 2.3.x-dev build errors - #335

Merged
staabm merged 1 commit into
phpstan:2.1.xfrom
staabm:fixb2
Sep 19, 2026
Merged

staabm merged 1 commit into
phpstan:2.1.xfrom
staabm:fixb2

Conversation

@staabm

@staabm staabm commented Sep 19, 2026

Copy link
Copy Markdown
Contributor
There were 2 errors:

1) PHPStan\Rules\ForLoop\OverwriteVariablesWithForLoopInitRuleTest::testRule
PHPStan\ShouldNotHappenException: getReadWritePropertiesExtensions(), shouldPolluteScopeWithLoopInitialAssignments() and shouldPolluteScopeWithAlwaysIterableForeach() no longer configure the analysis. Register the extensions as services and set the parameters in a config file returned from getAdditionalConfigFiles() instead.

phar:///home/runner/work/phpstan-src/phpstan-src/extension/vendor/phpstan/phpstan/phpstan.phar/src/Testing/RuleTestCase.php:77
phar:///home/runner/work/phpstan-src/phpstan-src/extension/vendor/phpstan/phpstan/phpstan.phar/src/Testing/RuleTestCase.php:85
phar:///home/runner/work/phpstan-src/phpstan-src/extension/vendor/phpstan/phpstan/phpstan.phar/src/Testing/RuleTestCase.php:202
phar:///home/runner/work/phpstan-src/phpstan-src/extension/vendor/phpstan/phpstan/phpstan.phar/src/Testing/RuleTestCase.php:97
/home/runner/work/phpstan-src/phpstan-src/extension/tests/Rules/ForLoop/OverwriteVariablesWithForLoopInitRuleTest.php:21

2) PHPStan\Rules\ForLoop\OverwriteVariablesWithForLoopInitRuleTest::testLoopVariableReuse
PHPStan\ShouldNotHappenException: getReadWritePropertiesExtensions(), shouldPolluteScopeWithLoopInitialAssignments() and shouldPolluteScopeWithAlwaysIterableForeach() no longer configure the analysis. Register the extensions as services and set the parameters in a config file returned from getAdditionalConfigFiles() instead.

phar:///home/runner/work/phpstan-src/phpstan-src/extension/vendor/phpstan/phpstan/phpstan.phar/src/Testing/RuleTestCase.php:77
phar:///home/runner/work/phpstan-src/phpstan-src/extension/vendor/phpstan/phpstan/phpstan.phar/src/Testing/RuleTestCase.php:85
phar:///home/runner/work/phpstan-src/phpstan-src/extension/vendor/phpstan/phpstan/phpstan.phar/src/Testing/RuleTestCase.php:202
phar:///home/runner/work/phpstan-src/phpstan-src/extension/vendor/phpstan/phpstan/phpstan.phar/src/Testing/RuleTestCase.php:97
/home/runner/work/phpstan-src/phpstan-src/extension/tests/Rules/ForLoop/OverwriteVariablesWithForLoopInitRuleTest.php:67

@staabm

staabm commented Sep 19, 2026

Copy link
Copy Markdown
Contributor Author

after this change

There were 2 failures:

1) PHPStan\Levels\LevelsIntegrationTest::testLevels with data set #0 ('arithmeticOperators')
Failed asserting that file "/Users/staabm/workspace/phpstan-strict-rules/tests/Levels/data/arithmeticOperators-4.json" exists.

phar:///Users/staabm/workspace/phpstan-strict-rules/vendor/phpstan/phpstan/phpstan.phar/src/Testing/LevelsTestCase.php:148
phar:///Users/staabm/workspace/phpstan-strict-rules/vendor/phpstan/phpstan/phpstan.phar/src/Testing/LevelsTestCase.php:110

2) PHPStan\Levels\LevelsIntegrationTest::testLevels with data set #2 ('foreach')
Failed asserting that file "/Users/staabm/workspace/phpstan-strict-rules/tests/Levels/data/foreach-4.json" exists.

phar:///Users/staabm/workspace/phpstan-strict-rules/vendor/phpstan/phpstan/phpstan.phar/src/Testing/LevelsTestCase.php:148
phar:///Users/staabm/workspace/phpstan-strict-rules/vendor/phpstan/phpstan/phpstan.phar/src/Testing/LevelsTestCase.php:110

FAILURES!
Tests: 67, Assertions: 151, Failures: 2.

this error is left

@staabm
staabm requested a review from ondrejmirtes September 19, 2026 06:38
@staabm
staabm merged commit b39a53a into phpstan:2.1.x Sep 19, 2026
30 of 45 checks passed
@staabm
staabm deleted the fixb2 branch September 19, 2026 08:40
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.

2 participants