Skip to content

Bump to PHPStan 2.1.9#6806

Merged
samsonasik merged 4 commits intomainfrom
bump-phpstan-219
Mar 23, 2025
Merged

Bump to PHPStan 2.1.9#6806
samsonasik merged 4 commits intomainfrom
bump-phpstan-219

Conversation

@samsonasik
Copy link
Member

Bump to latest PHPStan 2.1.9 seems cause error in tests:

There were 2 errors:

1) Rector\Tests\Php55\Rector\String_\StringClassNameToClassConstantRector\StringClassNameToClassConstantRectorTest::test with data set #4 ('/Users/samsonasik/www/rector-...hp.inc')
PHPStan\Analyser\UndefinedVariableException: Undefined variable: $field1

phar:///Users/samsonasik/www/rector-src/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/MutatingScope.php:427
phar:///Users/samsonasik/www/rector-src/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/MutatingScope.php:1487
phar:///Users/samsonasik/www/rector-src/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/MutatingScope.php:1487
phar:///Users/samsonasik/www/rector-src/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/MutatingScope.php:554
phar:///Users/samsonasik/www/rector-src/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php:1845
phar:///Users/samsonasik/www/rector-src/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php:727
phar:///Users/samsonasik/www/rector-src/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php:404
/Users/samsonasik/www/rector-src/src/NodeTypeResolver/PHPStan/Scope/PHPStanNodeScopeResolver.php:461
/Users/samsonasik/www/rector-src/src/NodeTypeResolver/PHPStan/Scope/PHPStanNodeScopeResolver.php:247

This PR try to resolve it.

@samsonasik
Copy link
Member Author

Fixed 🎉

@samsonasik
Copy link
Member Author

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I am merging it ;)

@samsonasik samsonasik merged commit 18f9216 into main Mar 23, 2025
44 checks passed
@samsonasik samsonasik deleted the bump-phpstan-219 branch March 23, 2025 14:28
@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants