DEV Community

Discussion on: Understanding Dependency Inversion principle

Collapse
 
jefrancomix profile image
Jesús Franco

Which Service Container will know that you have only one implementation of the abstraction?

Collapse
 
mguinea profile image
Marc Guinea

No one, for that, it’s important that they provide a way to solve it. For example, in Laravel you can use “contextual binding” laravel.com/docs/8.x/container#con...