Skip to content

Implement JsonSerializable interface #67

Closed
@Daanvm

Description

@Daanvm

Currently encoding an Enum object with json_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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions