Skip to content

Conversation

@samsonasik
Copy link
Member

@samsonasik samsonasik commented Jan 19, 2026

the change:

  • no longer exists PHPStan VariadicFunctionsVisitor and VariadicMethodsVisitor
  • new Scope named PHPStan\Analyser\Fiber\FiberScope, need to be converted to:
if ($scope instanceof \PHPStan\Analyser\Fiber\FiberScope) {
     $scope = $scope->toMutatingScope();
}

on PHPStanNodeScopeResolver and on use of $scope->getParentScope()

  • OptimizedSingleFileSourceLocator need to be created via OptimizedSingleFileSourceLocatorRepository

Fixes rectorphp/rector#9604

@samsonasik
Copy link
Member Author

@TomasVotruba it seems there is error on ContainerMemento after update to PHPStan 2.1.34

PHP Warning: Undefined array key 0 in /home/runner/work/rector-src/rector-src/src/DependencyInjection/PHPStan/PHPStanContainerMemento.php on line 44

see https://github.com/rectorphp/rector-src/actions/runs/21150186226/job/60824424332?pr=7844#step:8:10

@samsonasik
Copy link
Member Author

samsonasik commented Jan 19, 2026

@TomasVotruba ready for merge 👍 the notice on rector-laravel test and rector/rector-compat-tests compat on other repo need merge and new release first :)

@samsonasik samsonasik changed the title Bump to PHPStan 2.1.34 Bump to PHPStan 2.1.34 and fix compatible code Jan 19, 2026
Copy link

@MGatner MGatner left a comment

Choose a reason for hiding this comment

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

LGTM!

@TomasVotruba
Copy link
Member

LGTM 👌

@TomasVotruba TomasVotruba merged commit 01406fb into main Jan 19, 2026
55 of 57 checks passed
@TomasVotruba TomasVotruba deleted the bump-phpstan-2134 branch January 19, 2026 21:30
@samsonasik
Copy link
Member Author

Released immediate rector 2.3.2 for it :) https://github.com/rectorphp/rector/releases/tag/2.3.2

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.

RectorPHP breaks with PHPStan 2.1.34

5 participants