-
-
Notifications
You must be signed in to change notification settings - Fork 132
Implement JsonSerializable interface #67
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
Comments
Note that if a new version for PHP 5.4 is created, Composer will still install older versions for PHP 5.3 users and prevent the incompatible version from being installed. |
I agree, it is time to drop PHP 5.3. I had a look at packages that use PhpEnum (https://packagist.org/packages/myclabs/php-enum/dependents) and I couldn't see any big one compatible with PHP 5.3. @Daanvm I'm 👍 with a PR that drops PHP 5.3 :) Then we'll be able to support serialization. |
Great! I'll create a PR for dropping PHP 5.3 and another PR to add JSON serialization support. |
Currently encoding an
Enum
object withjson_encode()
returns{}
, which isn't really useful.This has been requested before in #30 and #60, but the
JsonSerializable
interface only exists since PHP 5.4. This library still supports PHP 5.3.However, now we're a few years later, PHP 5.3 is end of life for over 3 and a half years. The current build doesn't even succeed because PHP 5.3 is no longer available in Travis. I think supporting such old versions of PHP isn't a valid argument anymore.
I am more than willing to create a pull request if you would allow me to bump the PHP requirement to 5.4.
The text was updated successfully, but these errors were encountered: