Skip to content
This repository was archived by the owner on Mar 14, 2025. It is now read-only.
This repository was archived by the owner on Mar 14, 2025. It is now read-only.

Deprecation Warning in Symfony 3.3 #8

Description

@spackmat

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions