Closed nikophil closed 6 months ago
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 class_alias
for classes that don't belong to this library can lead to other issues (like an other library checking if the class exist ...). That's bad that php-parser doesn't provide a clean migration path. The best would be that php-parser 4.x would have provided the new classes directly.
A clean alternative would be to create factory functions here, that uses the correct class name depending on the php-parser version.
like an other library checking if the class exist ...
you're right, I did not think about it
The best would be that php-parser 4.x would have provided the new classes directly.
indeed :shrug: this deprecation layer is not really clean IMO
A clean alternative would be to create factory functions here, that uses the correct class name depending on the php-parser version.
this was actually what I done in an earlier version :sweat_smile:
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?