php-schema2class icon indicating copy to clipboard operation
php-schema2class copied to clipboard

bc-break feat: implement EnumGenerator using nikic/PHP-parser

Open simivar opened this issue 1 year ago • 0 comments

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

simivar avatar Nov 13 '24 22:11 simivar