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

API platform seems to be not using/throwing away framework.serializer.default_context configuration #6280

Closed
ostrolucky opened this issue Apr 3, 2024 · 1 comment

Comments

@ostrolucky
Copy link
Contributor

API Platform version(s) affected: 3.2.18

Description
If you have seld/jsonlint installed, since https://symfony.com/blog/new-in-symfony-6-4-serializer-improvements#detailed-json-decoding-errors in dev mode symfony serializer is supposed show something more useful than "Syntax error"

This can also be enabled in production by using this config:

framework:
 serializer:
  default_context:
   php/const Symfony\Component\Serializer\Encoder\JsonDecode::DETAILED_ERROR_MESSAGES: true

Neither works with APIP, however.

How to reproduce
Install seld/jsonlint and send payload to APIP endpoint that's not a valid JSON

@ostrolucky
Copy link
Contributor Author

Whoops, this was a typo on our side should be !php/const instead of php/const

@ostrolucky ostrolucky closed this as not planned Won't fix, can't repro, duplicate, stale May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants