Closed HeyRatFans closed 2 years ago
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.
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.
@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?
@driehle can this be considered closed
now? If so, a release can be cut :+1:
@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.
This PR adds support for enums via strategies. Inspired by @ezkimo