Skip to content

[4.x] Make entries json serializable#9514

Closed
sylvesterdamgaard wants to merge 1 commit intostatamic:4.xfrom
sylvesterdamgaard:feature/entry-jsonserializable
Closed

[4.x] Make entries json serializable#9514
sylvesterdamgaard wants to merge 1 commit intostatamic:4.xfrom
sylvesterdamgaard:feature/entry-jsonserializable

Conversation

@sylvesterdamgaard
Copy link
Copy Markdown
Contributor

To pass event data into webhooks as json, we need to be able to serialize the entries to json.
This update adds JsonSerializable to the entries for this purpose.

Without JsonSerializable, the EntrySaving event will return a empty object for the entry like below example.

{
    "trigger_event":"Statamic\\Events\\EntrySaving",
    "event":{
        "entry":{}
    }
}

@jasonvarga jasonvarga self-assigned this Feb 28, 2024
@jasonvarga
Copy link
Copy Markdown
Member

Aiming to solve this in #9672 for v5.

@jasonvarga jasonvarga closed this Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants