This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Support zend-servicemanager v2+v3 #22
Merged
weierophinney
merged 12 commits into
zendframework:develop
from
weierophinney:feature/21
Feb 10, 2016
Merged
Support zend-servicemanager v2+v3 #22
weierophinney
merged 12 commits into
zendframework:develop
from
weierophinney:feature/21
Feb 10, 2016
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…anager Fixed the plugin with the new Service Manager version
- `composer.json`: - Updates PHP version to `^5.5 || ^7.0` - Updates develop branch alias to `2.6` - Updates zend-servicemanager requirement to `^2.7.2 || ^3.0` - Code changes: - Updated `LoaderPluginManager` to implement both `validate()` and `validatePlugin()` (latter proxies to former). - Updated `TranslatorServiceFactory` to implement both v2 and v3 factory methods, with v2 method proxying to v3. - Updated `HelperConfig`: - define aliases + invokable factories; - alter `configureServiceManager` to call SM methods setters instead of `configure()` (for portability) - implemented `toArray()` (v3 method) - Updated `TranslatorTest` to use Config objects + `configureServiceManager()` method to seed SM and plugin manager instances.
Labeled as a WIP, as several dependencies are on components that also bring in SM refactors, but which have not been updated to support both v2 and v3 of the SM (only v3). As such, the CI checks on this will fail until those are updated. |
@weierophinney can you update the composer.json and .travis to use zend-servicemanager 2.7.3? |
Use v2.6.2 || v3.0.
Adds the pattern used in zendframework/zend-serializer#8 for determining which version of each library to use when testing.
@ezimuel Done! I made it test against the v2 and v3 versions of both the service manager and event manager while I was at it. |
Travis config is already correct.
Pins all requirements to stable versions, selecting versions forwards-compatible with zend-stdlib and zend-servicemanager 3.0 where available. For those that are not, we will omit them from testing when testing forwards compatibility.
Omits tests utilizing features from zend-view, zend-validator, and zend-cache when their classes are unavailable, and omits installing those components when performing forwards-compatibility tests for zend-servicemanager v3.
Adds `LoaderPluginManagerCompatibilityTest` to allow ensuring the `LoaderPluginManager` is forwards compatible with zend-servicemanager v3, and fixes several inconsistencies. Additionally, updates the `Zend\I18n\View\HelperConfig::$factories` definition to add the legacy (v2) canonicalized helper keys required for plugin managers to remain v2 compatible.
- Fixed argument name for `LoaderPluginManager::validatePlugin()` implementation so that it's consistent with the definition. - Rewrote `triggerUntil()` methods as `triggerEventUntil()`, as the `triggerUntil()` argument order changes between v2 and v3. - Use the `config` service, not the `Config` or `Configuration` service. - Mock against container-interop, not `ServiceLocatorInterface`
weierophinney
added a commit
that referenced
this pull request
Feb 10, 2016
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch builds on the one originally submitted via #21, and expands it to provide support for both v2 and v3 of zend-servicemanager. Specifically, it introduces the following changes:
composer.json
:^5.5 || ^7.0
2.6
^2.7.2 || ^3.0
LoaderPluginManager
to implement bothvalidate()
andvalidatePlugin()
(latter proxies to former).TranslatorServiceFactory
to implement both v2 and v3 factory methods, with v2 method proxying to v3.HelperConfig
:configureServiceManager
to call SM methods setters instead ofconfigure()
(for portability)toArray()
(v3 method)TranslatorTest
to use Config objects +configureServiceManager()
method to seed SM and plugin manager instances.