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

Complete zend-servicemanager v2+v3 compatibility #51

Merged
merged 6 commits into from
Feb 17, 2016

Conversation

weierophinney
Copy link
Member

This patch builds on the commits from #50, and adds the following changes to the ValidatorPluginManager to guarantee v2 + v3 compatibility:

  • Use the same signature as the v2 abstract plugin manager.
  • In the constructor, call addInitializer() instead of adding initializers to the configuration array; guarantees compatibility.
  • Add $shareByDefault property as alias for $sharedByDefault.
  • Selectively skip tests for components not yet forwards-compatible (zend-db, zend-session).
  • Added a plugin manager compatibility test based on the trait from zend-servicemanager.

and various and other sundry updates. Currently tested against both v2 and v3 of the servicemanager, on all platforms.

Currently, several tests fail due to pending zend-i18n updates. Additionally, since several dependencies also require zend-servicemanager and have not yet been updated to work with both v2 and v3, v2 tests cannot run.

ezimuel and others added 6 commits February 17, 2016 11:48
Makes the following changes to ensure v2 + v3 compatibility:

- Use the same signature as the v2 abstract plugin manager.
- In the constructor, call `addInitializer()` instead of adding initializers to
  the configuration array; guarantees compatibility.
- Add `$shareByDefault` property as alias for `$sharedByDefault`.
- zend-filter 2.6
- zend-stdlib 2.7/3.0
- zend-math 2.6
- zend-config 2.6
- Updates all dependencies to stable versions; if the dependency has
  forwards-compat changes for v3 components, pins to those.
- Selectively skip zend-db, zend-session tests when testing against
  servicemanager v3.
ValidatorPluginManager:
- Removed all barcode adapters from aliases and factories; these are not actual
  validators, but consumed by the barcode validator.
- Used `$plugin` terminology over `$instance` for validation.
- Modified `validatePlugin()` to throw v2 exception.
- Added factory entries using normalized names to ensure BC with v2.
- Used `$container` verbiage over `$locator` verbiage.
- Updated `injectTranslator` to check if being used in a v2 context; if
  so, it pulls the translator from the parent container.
- Simplified tests for translator injection verification using Prophecy.
- Updated tests for expected exceptions to test for either v2 or v3 exceptions.
- Added compatibility tests.

StaticValidator:
- Configure the "share by default" flag based on version of
  zend-servicemanager.
@weierophinney weierophinney merged commit 6efb07b into zendframework:develop Feb 17, 2016
weierophinney added a commit that referenced this pull request Feb 17, 2016
weierophinney added a commit that referenced this pull request Feb 17, 2016
@weierophinney weierophinney deleted the feature/50 branch February 17, 2016 18:01
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.

2 participants