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

Forwards compatibility with zend-(event|service)manager v3 releases #28

Merged

Conversation

weierophinney
Copy link
Member

This patch removes the work done to make the component target only the v3 releases, as well as removes the changes to how service configuration was aggregated and injected. (These latter became unnecessary due to changes in zend-servicemanager.)

Among other things:

  • Restores the LocatorRegisteredInterface and LocatorRegistrationListener. These were removed when we assumed we'd target v3, as zend-di integration can likely be assumed to be deprecated in that version. However, for a v2 release, we need to keep them for backwards compatibility.
  • Restores the original workflow of ServiceListener, with some minor refactors (extract methods).
  • Updates tests to use both backwards and forwards compatible syntax when working with service and event managers, ensuring tests will run in both versions.
  • Adds a CustomPluginManagerFactory for creating the CustomPluginManager instance when testing, and adds a method for testing plugin managers received expected configuration.

All dependencies were updated to known stable, forwards compatible versions where available, and the test matrix was updated to test against both v2 and v3 versions of zend-eventmanager and zend-servicemanager, on all PHP versions supported.

This patch allows the develop branch to once again target a 2.X release, specifically 2.7.

- Set target version to 2.7.0; updated dev-develop branch alias.
- Updated dependencies to known-stable, forwards compatible versions where
  possible.
- Updated test matrix:
  - One job per v2 / v3 variant, per PHP version.
  - On v3 test runs, remove zend-mvc dependency (not yet ready)
- Restores functionality removed in the develop branch previously, when
  we were targeting version 3, allowing this to be a backwards
  compatible 2.X release.
- Restores functionality to work with version 2.X of zend-mvc.
- Ensures tests are testing correct behavior. In particular, the
  "default service manager" instance is expected to be the same as the
  service manager injected is expected to be the same as whatever is
  passed as `service_manager` to `addServiceManager()`.
- Mark two test suites as skipped when running under v3 (due to
  dependency on zend-mvc).
- Fix test cases that fail under v3 due to differences in usage between
  v2 and v3 `setFactory()` return values.
@weierophinney weierophinney added this to the 2.7.0 milestone Feb 25, 2016
@weierophinney weierophinney merged commit 4db6018 into zendframework:develop Feb 25, 2016
weierophinney added a commit that referenced this pull request Feb 25, 2016
Combined with entries for #12 and #13, and revised them based on the final
changes in #28.
weierophinney added a commit that referenced this pull request Feb 25, 2016
@weierophinney weierophinney deleted the feature/forwards-compat branch February 25, 2016 17:54
weierophinney added a commit that referenced this pull request Feb 25, 2016
weierophinney added a commit that referenced this pull request Feb 25, 2016
Remove EventManagerIntrospectionTrait; unused since #28
weierophinney added a commit to weierophinney/zend-modulemanager that referenced this pull request Feb 25, 2016
PR zendframework#13 initially removed the LocatorRegistrationListener, and zendframework#28
re-added it. However, the listener was still removed from the set of
default listeners. This patch fixes that, to ensure backwards
compatibility.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants