Skip to content
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

Preparation of api-platform/core 4.0 #6618

Open
2 of 3 tasks
BacLuc opened this issue Jan 3, 2025 · 0 comments
Open
2 of 3 tasks

Preparation of api-platform/core 4.0 #6618

BacLuc opened this issue Jan 3, 2025 · 0 comments

Comments

@BacLuc
Copy link
Contributor

BacLuc commented Jan 3, 2025

Use the new functionality and remove the deprecated feature flag:

  • keep_legacy_inflector: false (already the new default behaviour activated)
  • rfc_7807_compliant_errors: true
  • standard_put: true (already the new default behaviour activated)

(from memory and from api-platform/core@754e499 )
And there is a guide: https://api-platform.com/docs/core/upgrade-guide/#api-platform-34

BacLuc added a commit to BacLuc/ecamp3 that referenced this issue Mar 22, 2025
It was a little tricky, but finally i figured out how to do it:
https://api-platform.com/docs/core/errors/

The big impact is, that the serialization of the errors is now
done with the same infrastructure as serializing entities.
That makes it less format dependent.

It seems a little weird that we use a provider to "replace" the exception path
of the response by extracting the exception to the context,
and then continuing like when we would serialize a response.
But i can also see the benefits.
See api-platform/core#5974

Issue: ecamp#6618
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

No branches or pull requests

1 participant