Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Update zend-mvc v2 to use zend-servicemanager-di #158

Merged
merged 2 commits into from
Jun 11, 2016

Conversation

weierophinney
Copy link
Member

zend-servicemanager-di contains tests and code to ensure it works against both v2 and v3 versions of zend-servicemanager, unlike the code currently in zend-mvc. Updating to use it is backwards compatible, assuming the following:

  • zend-servicemanager-di is tested against both v2 and v3 of zend-servicemanager, demonstrating that the various classes it contains that overlap with zend-servicemanager v2 pose no conflicts.
  • each of DiAbstractServiceFactoryFactory, DiFactory, DiServiceInitializerFactory, and DiStrictAbstractServiceFactory from zend-mvc v2 return artifacts from the Zend\ServiceManager\Di namespace, allowing them to simply extend the relevant factories that exist in zend-servicemanager-di.
  • DiStrictAbstractServiceFactoryFactory can be left intact, ensuring it returns the Zend\Mvc\Service\DiStrictAbstractServiceFactory instance, and thus preserving the inheritance tree.

All of the DI-related factories in zend-mvc are now marked deprecated as well, with annotations detailing how to upgrade code to work with zend-servicemanager-di to make it forwards-compatible.

This pull request supercedes #149 (the tests of which were incorporated directly in zend-servicemanager-di).

zend-servicemanager-di contains tests and code to ensure it works against both
v2 and v3 versions of zend-servicemanager, unlike the code currently in
zend-mvc. Updating to use it is backwards compatible, assuming the following:

- zend-servicemanager-di is tested against both v2 and v3 of
  zend-servicemanager, demonstrating that the various classes it contains that
  overlap with zend-servicemanager v2 pose no conflicts.
- each of DiAbstractServiceFactoryFactory, DiFactory,
  DiServiceInitializerFactory, and DiStrictAbstractServiceFactory from zend-mvc
  v2 return artifacts from the `Zend\ServiceManager\Di` namespace, allowing them
  to simply extend the relevant factories that exist in zend-servicemanager-di.
- DiStrictAbstractServiceFactoryFactory can be left intact, ensuring it returns
  the `Zend\Mvc\Service\DiStrictAbstractServiceFactory` instance, and thus
  preserving the inheritance tree.

All of the DI-related factories in zend-mvc are now marked deprecated as well,
with annotations detailing how to upgrade code to work with
zend-servicemanager-di to make it forwards-compatible.
@weierophinney weierophinney merged commit 8561263 into zendframework:release-2.7 Jun 11, 2016
weierophinney added a commit that referenced this pull request Jun 11, 2016
weierophinney added a commit that referenced this pull request Jun 11, 2016
@weierophinney weierophinney deleted the hotfix/149 branch June 11, 2016 18:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants