Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic support for enums via use of strategies #57

Closed
wants to merge 3 commits into from

Conversation

HeyRatFans
Copy link
Contributor

This PR adds support for enums via strategies. Inspired by @ezkimo

@driehle
Copy link
Member

driehle commented May 1, 2022

Thanks @HeyRatFans and @ezkimo, I am still thinking about this change. To me, it seems to break a bit with the current design of this component. Until now, everything worked out of the box without the need to configure strategies. Therefore, I am unsure if we should really break with this approach or if we should investige further to see if we can find a solution that works without the need for configuring strategies.

@TomHAnderson
Copy link
Member

Having used this component in many applications, implementing strategies is standard practice. We have already included many strategies in this package. Though an ideal solution would be to support all of PHPs features without further configuration, maintaining backward compatibility is important here. So until we can make the minimum PHP version 8.1, I am for requiring configuration of a strategy for enums as implemented here.

@driehle driehle added the Enhancement New feature or request label Jun 10, 2022
@driehle driehle self-assigned this Jun 10, 2022
@driehle driehle added this to the 3.1.0 milestone Jun 10, 2022
@driehle
Copy link
Member

driehle commented Jun 10, 2022

@HeyRatFans I rebased your work onto the latest 3.1.x branch, so that we can bring it into the upcoming 3.1.0 release. Please see PR #59. Could you please add documentation for this new feature?

@Ocramius
Copy link
Member

@driehle can this be considered closed now? If so, a release can be cut 👍

@driehle
Copy link
Member

driehle commented Jun 10, 2022

@Ocramius I am closing this PR now, as I just have merged #59. However, bevore a release of 3.1.0 I'd like to have something in the docs about the new enum strategy.

@driehle driehle closed this Jun 10, 2022
@driehle driehle removed this from the 3.1.0 milestone Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants