Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BetterPhpDocParser] Use ORIG_NODE attribute on DoctrineAnnotationDecorator on handle @\ after generic #5285

Merged
merged 2 commits into from
Nov 25, 2023

Conversation

samsonasik
Copy link
Member

Continue of PR:

This utilize ORIG_NODE attribute instead for reprint handling.

Comment on lines -21 to +24
$clonedNode->setAttribute(PhpDocAttributeKey::ORIG_NODE, $node);

if (! $clonedNode->hasAttribute(PhpDocAttributeKey::ORIG_NODE)) {
$clonedNode->setAttribute(PhpDocAttributeKey::ORIG_NODE, $node);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

this is essential to ensure when orig node exists, no need to re-fill with node, use whatever ORIG_NODE value is, eg: null for reprint.

@samsonasik
Copy link
Member Author

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

@samsonasik samsonasik merged commit 3f42ee9 into main Nov 25, 2023
41 checks passed
@samsonasik samsonasik deleted the orig-node branch November 25, 2023 04:54
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.

1 participant