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

Deprecation Warning in Symfony 3.3 #8

Open
spackmat opened this issue Jul 14, 2017 · 1 comment
Open

Deprecation Warning in Symfony 3.3 #8

spackmat opened this issue Jul 14, 2017 · 1 comment

Comments

@spackmat
Copy link

Hi, in Symfony 3.3, I get a Deprecation warning:

Autowiring services based on the types they implement is deprecated since Symfony 3.3 and won't be supported in version 4.0. You should rename (or alias) the "opentbs" service to "MBence\OpenTBSBundle\Services\OpenTBS" instead.

This is because the services.yml looks like this:

services:
    opentbs:
        class:        MBence\OpenTBSBundle\Services\OpenTBS
        arguments:    []

Changing it to this resolves the warning:

services:
    MBence\OpenTBSBundle\Services\OpenTBS:
        arguments: []
    opentbs:
        alias: MBence\OpenTBSBundle\Services\OpenTBS

I don't know if this would BC break something (aliasing works at least for Symfony 2.7), but i would appreciate it, when such a change will be implemented before Symfony 4.0 is released. :)

Greets,
spackmat

@mbence
Copy link
Owner

mbence commented Jul 14, 2017

Hi @spackmat,

thanks for the notice! I will look into this in a few days.

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