What is DI
for and what is its use case, when we have ServiceManager
?
They appear to be similar since in configuration files for both zend-di
and zend-servicemanager
we can set up some options such as aliases
and invokables
.
I am trying to get a better understanding of what is happening behind the scenes with these components, and documentation did not give me enough info.
Could you please tell me what the difference is and when I should use Di
instead of ServiceManager
?