Skip to content

Commit aee9f64

Browse files
committed
Updated Rector to commit f37b64ff26c78dd7ec2e1402e83e68bdccf52b34
rectorphp/rector-src@f37b64f [NodeManipulator] Ensure return cloned parent ClassMethod to avoid re-use ClassMethod object (#6858)
1 parent 881bcbe commit aee9f64

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = 'bc3a50188be303409d4d2ee86c21f5d00de0c6f9';
22+
public const PACKAGE_VERSION = 'f37b64ff26c78dd7ec2e1402e83e68bdccf52b34';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2025-04-22 10:51:40';
27+
public const RELEASE_DATE = '2025-04-22 18:23:38';
2828
/**
2929
* @var int
3030
*/

src/NodeManipulator/ClassDependencyManipulator.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,10 @@ private function resolveConstruct(Class_ $class) : ?ClassMethod
191191
// which parent::__construct() will cause error
192192
break;
193193
}
194+
$constructorMethod = clone $parentConstructorMethod;
194195
// reprint parent method node to avoid invalid tokens
195-
$this->nodeFactory->createReprintedNode($parentConstructorMethod);
196-
return $parentConstructorMethod;
196+
$this->nodeFactory->createReprintedNode($constructorMethod);
197+
return $constructorMethod;
197198
}
198199
return null;
199200
}

0 commit comments

Comments
 (0)