Skip to content

Conversation

@simivar
Copy link
Contributor

@simivar simivar commented Nov 13, 2024

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant