Skip to content

Commit

Permalink
Updated Rector to commit 8a7cd36365b2f05683f072309cd2484978d9e5b2
Browse files Browse the repository at this point in the history
rectorphp/rector-src@8a7cd36 [Renaming] Use continue 2 on RenameMethodRector after ClassMethod renamed on configured method call renames loop (#5989)
  • Loading branch information
TomasVotruba committed Jun 20, 2024
1 parent 856c640 commit 9257029
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions rules/Renaming/Rector/MethodCall/RenameMethodRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,12 @@ private function refactorClass($classOrInterface, Scope $scope)
continue;
}
foreach ($this->methodCallRenames as $methodCallRename) {
if ($this->shouldSkipRename($methodName, $classMethod, $methodCallRename, $classReflection, $classOrInterface)) {
if ($this->shouldSkipRename($methodName, $classMethod, $methodCallRename, $classOrInterface, $classReflection)) {
continue;
}
$classMethod->name = new Identifier($methodCallRename->getNewMethod());
$hasChanged = \true;
continue 2;
}
}
if ($hasChanged) {
Expand All @@ -166,7 +167,7 @@ private function refactorClass($classOrInterface, Scope $scope)
/**
* @param \PhpParser\Node\Stmt\Class_|\PhpParser\Node\Stmt\Interface_ $classOrInterface
*/
private function shouldSkipRename(string $methodName, ClassMethod $classMethod, MethodCallRenameInterface $methodCallRename, ClassReflection $classReflection, $classOrInterface) : bool
private function shouldSkipRename(string $methodName, ClassMethod $classMethod, MethodCallRenameInterface $methodCallRename, $classOrInterface, ?ClassReflection $classReflection) : bool
{
if (!$this->nodeNameResolver->isStringName($methodName, $methodCallRename->getOldMethod())) {
return \true;
Expand Down
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '2dda748541be13dac8ef328011bc50233f2030bc';
public const PACKAGE_VERSION = '8a7cd36365b2f05683f072309cd2484978d9e5b2';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-06-20 14:52:05';
public const RELEASE_DATE = '2024-06-20 22:34:06';
/**
* @var int
*/
Expand Down

0 comments on commit 9257029

Please sign in to comment.