Skip to content

Correct json serialization of Enum object instead of just {} #30

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

Closed
wants to merge 3 commits into from

Conversation

SeriousDron
Copy link

JsonSerializable was added only in PHP 5.4, but that's highly useful change

@@ -22,7 +22,7 @@
}
},
"require": {
"php": ">=5.3"
"php": ">=5.4"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a BC break, the PR cannot be merged as is.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that as you can see in comment. You may consider to use that changeset in new major version or some other branch.
I just wanted to let you know that json problem exists and there is simple solution

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand, thank you for providing the patch.

There is no new BC-breaking version planned since this is just a minor thing and a PHP implementation is in the works for 7.1, so I'll be closing this. Users can still implement this in sub-classes, but I don't see a big value since it doesn't support deserialization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants