Skip to content

EnumGenerator is immutable #117

@simivar

Description

@simivar

We are currently facing an issue with the EnumGenerator from the Laminas package. This is the only generator that is immutable and, as a result, it causes challenges when using the onEnumCreated hook. To modify any of the properties one is required to use Reflection

To address this, we propose introducing our own EnumGenerator based on the amazing nikic/PHP-Parser package. The benefits of doing this are:

  1. we can gain greater control and flexibility over the generator
  2. we can add almost any statement to the generated enum
  3. we can provide the end user with more customizability

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions