Skip to content

[CodeQuality] Handle crash on UnaryMinus/UnaryPlus on InlineArrayReturnAssignRector#7277

Merged
samsonasik merged 2 commits intomainfrom
handle-crash
Sep 15, 2025
Merged

[CodeQuality] Handle crash on UnaryMinus/UnaryPlus on InlineArrayReturnAssignRector#7277
samsonasik merged 2 commits intomainfrom
handle-crash

Conversation

@samsonasik
Copy link
Member

Per #7271 (comment) , this is to handle crash on UnaryPlus/UnaryMinus to avoid error:

         "System error: "Not implemented yet. Go to "Rector\PhpParser\Node\NodeFactory::createArrayItem()" and add check
         for "PhpParser\Node\Expr\UnaryMinus" node."  

@samsonasik
Copy link
Member Author

Fixed 🎉 /cc @TomasVotruba

@samsonasik
Copy link
Member Author

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

@samsonasik samsonasik enabled auto-merge (squash) September 15, 2025 00:07
@samsonasik samsonasik merged commit f4003bb into main Sep 15, 2025
49 checks passed
@samsonasik samsonasik deleted the handle-crash branch September 15, 2025 00:08
$arrayItem = new ArrayItem($item);
$this->decorateArrayItemWithKey($key, $arrayItem);
return $arrayItem;
}
Copy link
Member

Choose a reason for hiding this comment

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

👏

@github-actions
Copy link
Contributor

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 Feb 15, 2026
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.

2 participants