zendframework/zf2 — pull request #5237 by turrsis (2013-10-07 12:43:24+00:00)
Title: ServiceManager - fix AbstractFactories performance and service waiting

When ServiceManager get service, it call canCreateFromAbstractFactory 3 times and check all abstract factories 3 times. And after this check all abstract factories for creating service. In total : 4 cycles for all abstract factories and 4 call abstractFactory::canCreateServiceWithName for each factory.

https://github.com/zendframework/zf2/pull/4285 is litle wrong - see ServiceManagerTest::testWaitingAbstractFactory(). Second call of $this->serviceManager->has('SomethingThatCanBeCreated') was failed, but the service already exists.