8000 DependencyInjectionContainer id naming problem. · Issue #11761 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
DependencyInjectionContainer id naming problem. #11761
Closed
@ivokoster

Description

@ivokoster

Configured a service in the services.php with the id: 'testbundle.test_this'
Using it works perfect, except one strange behavior.

Calling it in your front controller with:
$this->get('testbundle.testthis');
Will throw no error, and gives you a NEW copy on the class, and replaces it in its container.
Calling $this->get('testbundle.test_this') afterwards will give you the NEW object.

Expected behavior: a error thrown of unknown id.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0