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

Symfony 3.4 - jms_serializer.json_deserialization_visitor service is private #632

Closed
bgarel opened this issue Jan 8, 2018 · 1 comment
Closed

Comments

@bgarel
Copy link

bgarel commented Jan 8, 2018

In Symfony 3.4, when using json deserialization, I have the deprecation warning :
The "jms_serializer.json_deserialization_visitor" service is private, getting it from the container is deprecated since Symfony 3.2 and will fail in 4.0. You should either make the service public, or stop using the container directly and use dependency injection instead.

Example :

$serializer = $this->getContainer()->get('jms_serializer');
$pro = $serializer->deserialize($json, Pro::class, 'json');

My phpunit tests return exit code 1 because of the warning.
Is there a way not to have this warning ?

Regards,

@goetas
Copy link
Collaborator

goetas commented Jan 30, 2018

solved by #635

@goetas goetas closed this as completed Jan 30, 2018
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

2 participants