Skip to content

[DeadCode] Handle Infinite recursion on self referenced trait on PHPStanNodeScopeResolver - #7925

Closed
samsonasik wants to merge 1 commit into
mainfrom
handle-infinite
Closed

[DeadCode] Handle Infinite recursion on self referenced trait on PHPStanNodeScopeResolver#7925
samsonasik wants to merge 1 commit into
mainfrom
handle-infinite

Conversation

@samsonasik

Copy link
Copy Markdown
Member

// fallback to fill by found scope
RectorNodeScopeResolver::processNodes($stmts, $mutatingScope);
} catch (Error $error) {
if (! str_contains($error->getMessage(), 'Infinite recursion?')) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this tweak seems only shown on phpunit, on real run cli command, it still recurse.

@github-actions

Copy link
Copy Markdown
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 Aug 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Rector hangs indefinitely when processing model with self-referencing trait, generic PHPDoc, and Eloquent relationship

1 participant