i try to understand how Zend\Di (i mean the Dependency injection container, not dependency injection itself) is related to the ServiceManager. Is it correct, that the Invokables, Factories, Aliases and Services are not related to the Container?
The only relationship i can found is the DiAbstractServiceFactory, which is registered by default in MVC. It uses the DiC to search for classes.
Is this correct?
Thanks!
I would say your assessment is correct – the DI container is there if you want to use it but is not related to Factories, Aliases and Services.
Prior to the addition of the ServiceManager the DI container was used much more heavily. There is an interesting thread created around the time when the ServiceManager was added - http://zend-framework-community.634137.n4.nabble.com/Services-Instances-Dependencies-in-ZF2-td4584632.html