Skip to content

Conversation

@TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Dec 8, 2025

No description provided.

@TomasVotruba TomasVotruba changed the title tv decouple attributes Remove setAttribute() from Rector rules, where not suitable + add phpstan rule to help separate to DecoratingNodeVisitors Dec 8, 2025
@TomasVotruba TomasVotruba force-pushed the tv-decouple-attributes branch 2 times, most recently from a34259c to 34fdc93 Compare December 8, 2025 15:35
@TomasVotruba TomasVotruba force-pushed the tv-decouple-attributes branch from 34fdc93 to 57bb816 Compare December 8, 2025 19:06
@TomasVotruba TomasVotruba merged commit 88d58c1 into main Dec 8, 2025
57 checks passed
@TomasVotruba TomasVotruba deleted the tv-decouple-attributes branch December 8, 2025 20:38
if ($comments !== []) {
$this->mirrorComments($arrowFunction->expr, $node->stmts[0]);
$arrowFunction->setAttribute(AttributeKey::COMMENT_CLOSURE_RETURN_MIRRORED, true);
$arrowFunction->setAttribute(AttributeKey::COMMENTS, true);
Copy link
Member

Choose a reason for hiding this comment

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

@TomasVotruba this seems cause crash as will cause ->getComments() that returns comments attribute that has array native return, see issue:

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

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.

3 participants