-
Notifications
You must be signed in to change notification settings - Fork 17
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
fix: handle deprecated class LNumber in nikic/php-parser v5 #148
fix: handle deprecated class LNumber in nikic/php-parser v5 #148
Conversation
Not a fan of this, i would keep declaring the alias where it is really needed, not on the AutoMapper class, main problem is that if we change this later (like some lib that don't depend on the AutoMapper class) we would not have those alias |
Using A clean alternative would be to create factory functions here, that uses the correct class name depending on the php-parser version. |
you're right, I did not think about it
indeed 🤷 this deprecation layer is not really clean IMO
this was actually what I done in an earlier version 😅 |
af0b990
to
9f81989
Compare
* Constructs an integer number scalar node. | ||
* | ||
* @param int $value Value of the number | ||
* @param array<string, mixed> $attributes Additional attributes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This functions should be @internal
I think since the
Automapper
is the only entrypoint of this whole lib, we can addclass_alias()
in this class, and problem would be solved.WDYT?