Closed HaisojYellams closed 4 years ago
@HaisojYellams thanks you for reporting this but. The bug has been reproduced and will be fixed ASAP.
I would like to avoid any additional methods that will be required to know. It will affect developer experience. There is another option that will give the possibility to recognize abstract classes automatically but I don't like it. Need to make some benchmarks before fixing it.
Thanks for the update. Let me know if I can help in any way.
Please consider the following example (simplified code for readability):
EnumerationWrapper.php
FieldReadMode.php
If I add the
FieldReadMode::initiailize()
call to the end of the FieldReadMode.php file, everything works as expected, but if I instead use theStaticConstructorLoader
class in order to simplify the initialization, I end up with an error like:I believe this is due to the
__constructStatic()
method withinEnumeration
initializing any child class, including abstract ones.If I overlooked something and this is user error, please let me know. Otherwise I've come up with a solution below.
I was able to circumvent this issue by adding the following method to
Enumeration
:and changing the
__constructStatic()
method to be:and finally overriding the new method in
EnumerationWrapper
to beI'm not saying this is the most elegant or valid solution, but it's one that is working for me currently.
If you would prefer I fork the project and make a PR with this implementation let me know. Thanks for your work on this project!