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

[DI] Support optional class for named services #847

Closed
Haehnchen opened this issue Jan 9, 2017 · 2 comments
Closed

[DI] Support optional class for named services #847

Haehnchen opened this issue Jan 9, 2017 · 2 comments
Labels

Comments

@Haehnchen
Copy link
Owner

Haehnchen commented Jan 9, 2017

For a valid class name service indexer needs a class attribute, but class is now optional.

services:
    Vendor\Namespace\Class:
        class: Vendor\Namespace\Class
        autowire: true
services:
    Vendor\Namespace\Class:
        autowire: true

symfony/symfony#21133
symfony/symfony@306a060

Notes:
id converts to lower, think of empty syntax

<service id="appbundle\mytestclass" class="AppBundle\MyTestClass"/>
AppBundle\MyTestClass: ~
AppBundle\MyTestClass: {}
@natebrunette
Copy link

@Haehnchen I'm having an issue navigating to the service definition when the name is a class name. Is this something that should be working?

@Haehnchen
Copy link
Owner Author

@natebrunette if yaml files? fixed by 0bebd36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants