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

[DependencyInjection] Circular reference detected for autowired decorator #28283

Closed
BoShurik opened this issue Aug 27, 2018 · 2 comments
Closed

Comments

@BoShurik
Copy link
Contributor

Symfony version(s) affected: 4.1.3

Description
With this config

App\DI\Foo\FooInterface: '@App\DI\Foo\Foo'

App\DI\Foo\FooDecorator:
    decorates: App\DI\Foo\FooInterface

App\DI\Bar\BarInterface: '@App\DI\Bar\Bar'

App\DI\Bar\BarDecorator:
    decorates: App\DI\Bar\BarInterface

I've got

Circular reference detected for service "App\DI\Foo\FooDecorator", path: "App\DI\Foo\FooDecorator -> App\DI\Foo\FooDecorator".

If I comment decorates: App\DI\Bar\BarInterface line - all works fine
Explicit setting

arguments:
    $decorated: '@App\DI\Bar\BarDecorator.inner'

also works

How to reproduce
https://github.com/BoShurik/symfony-di-issue

@nicolas-grekas
Copy link
Member

I think this has been fixed by #28060
I cannot reproduce it when I upgrade to 4.1.4@dev

@BoShurik
Copy link
Contributor Author

Yes, it works. Thanks!

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