yceruto
yceruto

Reputation: 9575

Avoid Circular Reference in Symfony DI

Is there any design pattern to solve the circular reference issue? that is not injecting the service container!

For example:

Thanks.

Upvotes: 0

Views: 534

Answers (1)

DerStoffel
DerStoffel

Reputation: 2633

I'd recommend having a look at the Dependency Inversion Principle (DIP)

Also see SOLID principles and a helpful article about it on tutsplus (DIP)

One good way to eliminate circular dependencies.

Upvotes: 1

Related Questions