Updated Rector to commit a56ee1ed01bbbdae515b49fe4d820f219208f768

a56ee1ed01 [DeadCode] Fix infinite loop on RemoveDeadStmtRector + RemoveUnusedVariableAssignRector (#5666)
This commit is contained in:
Tomas Votruba 2024-02-27 12:11:43 +00:00
parent d34d554ada
commit d24ee522ce
2 changed files with 5 additions and 4 deletions

View File

@ -84,12 +84,13 @@ CODE_SAMPLE
if ($livingCode === [$node->expr]) { if ($livingCode === [$node->expr]) {
return null; return null;
} }
$node->expr = \array_shift($livingCode); $newNode = clone $node;
$newNode->expr = \array_shift($livingCode);
$newNodes = []; $newNodes = [];
foreach ($livingCode as $singleLivingCode) { foreach ($livingCode as $singleLivingCode) {
$newNodes[] = new Expression($singleLivingCode); $newNodes[] = new Expression($singleLivingCode);
} }
$newNodes[] = $node; $newNodes[] = $newNode;
return $newNodes; return $newNodes;
} }
private function hasGetMagic(Expression $expression) : bool private function hasGetMagic(Expression $expression) : bool

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api * @api
* @var string * @var string
*/ */
public const PACKAGE_VERSION = '58abec4c5663a5d92ac6cd0a2eef6aace80ab408'; public const PACKAGE_VERSION = 'a56ee1ed01bbbdae515b49fe4d820f219208f768';
/** /**
* @api * @api
* @var string * @var string
*/ */
public const RELEASE_DATE = '2024-02-25 00:26:08'; public const RELEASE_DATE = '2024-02-27 19:09:04';
/** /**
* @var int * @var int
*/ */