php-schema2class
php-schema2class copied to clipboard
bc-break feat: implement EnumGenerator using nikic/PHP-parser
This commit introduces a new and custom EnumGenerator to address the limitations we faced with the immutable Laminas' EnumGenerator
Instead of relying on the Laminas' generator, we've now built our own generator using the nikic/PHP-Parser package. By making this switch, we've successfully removed the need for reflection to modify properties - something we had to do with the old EnumGenerator. Moreover, with the provided user-friendly function applied to the nodes, end-users can add virtually any PHP statement that the nikic/php-parser package supports
If this solution is accepted we can do the same changes for the rest of hooks and generators