-
-
Notifications
You must be signed in to change notification settings - Fork 312
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
Symfony 3 'json' method gives errors with JMS #523
Comments
@askhalil to fix this you need to disable short alias ("serializer") for JMS Serializer: # app/config/config.yml
jms_serializer:
enable_short_alias: false |
@askhalil could close this issue ? The @kubawerlos's tip resolves this problem. |
@yceruto I dont think so. If you disable short alias, then \Symfony\Bundle\FrameworkBundle\Controller\Controller::json will not use JMSSerializerBundle, but json_encode or symfony serializer component if enabled. This should be fixed. |
It is still the expected behavior. Symfony does not use
If you need serialize all json response with JMSSerializeBundle, you need then override the |
@yceruto Then it should be visible writen in documentation, because it is unexpected behaviour. Everyone will see it as bug. |
@Tetragramat PR to the documentation are welcome |
@goetas |
yes, for the (just |
Thank you for this awesome library. I am running into a weird problem when I call
$this->json($data)
in symfony 3.1 controller. This is the error I am getting isjms/serializer-bundle version 1.1
jms/serializer version 1.2
Thank you
The text was updated successfully, but these errors were encountered: