Skip to content

Conversation

@samsonasik
Copy link
Member

Node->getComments() requires array native return type, which uses comments attribute, set comments attribute to true will make crash:

System error: "PhpParser\NodeAbstract::getComments(): Return value must be of type array, true returned

see rectorphp/rector#9562
Fixes rectorphp/rector#9562

@samsonasik
Copy link
Member Author

@TomasVotruba ready 👍

@TomasVotruba TomasVotruba merged commit f914c84 into main Dec 18, 2025
58 checks passed
@TomasVotruba TomasVotruba deleted the fix-crash-get-comments branch December 18, 2025 08:18
@TomasVotruba
Copy link
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System error: PhpParser\NodeAbstract::getComments()

3 participants