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 4 compatibility: Service visibility deprecation #200

Open
thanosp opened this issue Dec 5, 2017 · 3 comments
Open

Symfony 4 compatibility: Service visibility deprecation #200

thanosp opened this issue Dec 5, 2017 · 3 comments

Comments

@thanosp
Copy link

thanosp commented Dec 5, 2017

User Deprecated: The "lunetics_locale.allowed_locales_provider" 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.

User Deprecated: The "lunetics_locale.switcher_helper" 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.

Just updated to 3.4 and noticed these deprecations amongst others of ours.
I find it a bit weird that the tests are passing for symfony 4 for this bundle but haven't tried the combination yet myself.
Am I missing something? The related code/configuration seems unchanged.

@dbu
Copy link
Collaborator

dbu commented Dec 5, 2017

maybe the tests are lacking. are you sure you do not access this services with a $container->get() yourself? if its in this bundle, we should fix it to DI instead.

@thanosp
Copy link
Author

thanosp commented Dec 5, 2017

There are no mentions of these services in our codebase.

Maybe from here and here

@dbu
Copy link
Collaborator

dbu commented Dec 6, 2017

ups. can you try to rewrite that to inject the services and parameters in the constructor, instead of pulling them from the container?

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

Successfully merging a pull request may close this issue.

2 participants