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

Add getOriginalNode() method on ClassPropertyNode #3741

Closed
wants to merge 1 commit into from

Conversation

samsonasik
Copy link
Contributor

No description provided.

@samsonasik
Copy link
Contributor Author

Ready to merge 👍

@ondrejmirtes
Copy link
Member

What do you need this for?

@samsonasik
Copy link
Contributor Author

First, it is for consistency with other virtual node,
Second, I was experimenting to set scope on original node on rector side, when calling NodeScopeResolver::processNodes(), while only detected is ClassPropertyNode over original Property node.

@ondrejmirtes
Copy link
Member

The point of ClassPropertyNode is that it abstracts away Param and Property. It doesn't make sense to offer getOriginalNode because users would have to make if-else condition in their code about these two node types.

You can still hook your custom rector onto Param or Property, they do not disappear.

@samsonasik
Copy link
Contributor Author

Ok 👍

@samsonasik samsonasik closed this Dec 20, 2024
@samsonasik samsonasik deleted the add-get-original-ode branch December 20, 2024 07:00
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.

2 participants