Skip to content

Feat: add constants for PRE and POST serialize #489

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

Merged
merged 1 commit into from
May 31, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion core/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Name | Event | Pre & Post hooks
`DeserializeListener` | `kernel.request` | `PRE_DESERIALIZE`, `POST_DESERIALIZE`| 2 | deserialize data into a PHP entity (`GET`, `POST`, `DELETE`); update the entity retrieved using the data provider (`PUT`)
`ValidateListener` | `kernel.view` | `PRE_VALIDATE`, `POST_VALIDATE` | 64 | [validate data](validation.md) (`POST`, `PUT`)
`WriteListener` | `kernel.view` | `PRE_WRITE`, `POST_WRITE` | 32 | if using the Doctrine ORM, persist data (`POST`, `PUT`, `DELETE`)
`SerializeListener` | `kernel.view` | None | 16 | serialize the PHP entity in string [according to the request format](content-negotiation.md)
`SerializeListener` | `kernel.view` | `PRE_SERIALIZE`, `POST_SERIALIZE` | 16 | serialize the PHP entity in string [according to the request format](content-negotiation.md)
`RespondListener` | `kernel.view` | `PRE_RESPOND`, `POST_RESPOND` | 8 | transform serialized to a `Symfony\Component\HttpFoundation\Response` instance
`AddLinkHeaderListener` | `kernel.response` | None | 0 | add a `Link` HTTP header pointing to the Hydra documentation
`ValidationExceptionListener` | `kernel.exception` | None | 0 | serialize validation exceptions in the Hydra format
Expand All @@ -101,6 +101,8 @@ Constant | Event | Priority |
`POST_VALIDATE` | `kernel.view` | 63 |
`PRE_WRITE` | `kernel.view` | 33 |
`POST_WRITE` | `kernel.view` | 31 |
`PRE_SERIALIZE` | `kernel.request` | 17 |
`POST_SERIALIZE` | `kernel.request` | 15 |
`PRE_RESPOND` | `kernel.view` | 9 |
`POST_RESPOND` | `kernel.response` | 0 |

Expand Down