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

Updated to zend-servicemanager v3 #8

Merged

Conversation

weierophinney
Copy link
Member

  • composer.json entry for zend-servicemanager using dev-develop as 2.7.0.
  • Updated AbstractConfigFactory to follow new interface definition.
  • Updated ReaderPluginManager and WriterPluginManager to follow changes in AbstractPluginManager; they aggregate invokables and merge them with incoming configuration before passing on to the parent constructor.
  • Updated Factory to pass an empty service manager instance to plugin managers when lazy loading them.

- composer.json entry for zend-servicemanager using `dev-develop as 2.7.0`.
- Updated `AbstractConfigFactory` to follow new interface definition.
- Updated `ReaderPluginManager` and `WriterPluginManager` to follow
  changes in `AbstractPluginManager`; they aggregate invokables and
  merge them with incoming configuration before passing on to the parent
  constructor.
- Updated `Factory` to pass an empty service manager instance to plugin
  managers when lazy loading them.
@danizord
Copy link

danizord commented Oct 2, 2015

👍

@weierophinney
Copy link
Member Author

Coverage is less, as I marked a number of tests that feature the "Translator" processor as incomplete, until that component is updated for zend-servicemanager v3.

(is_object($plugin) ? get_class($plugin) : gettype($plugin)),
__NAMESPACE__
));
$config = array_merge_recursive(['invokables' => $this->invokableClasses], $config);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach is necessary as the SM doesn't have an $invokableClasses property any longer; it instead munges invokables into factory and alias definitions. As such, the configuration needs to be passed in during instantiation.

weierophinney added a commit to weierophinney/zend-modulemanager that referenced this pull request Oct 2, 2015
- Pins to zend-servicemanager dev-develop as 2.7.0
- Pins to branch for zendframework/zend-config#8 as 2.6.0
- Removes the LocatorRegistered feature and related listener
  - DI integration was removed from zend-servicemanager already
- ServiceListener overhaul:
  - Adds the `setApplicationServiceManager()` and `getServiceManagerConfig()`
    methods. The former is used to set the metadata for collecting application
    service manager configuration; the latter returns the merged configuration.
    These methods were added to both the interface and the implementation.
  - Aggregated plugins are instantiated, and added as "services" configuration
    for the service manager. When "pulled" from the service manager, the code
    uses `build()` to ensure the service is not cached, and to allow passing the
    configuration options.

The plan is for zend-mvc's `Application::bootstrap()` to check for a service
listener service on completion, and, if found, pull it. It will then pass the
return value of `getServiceManagerConfig()` to the `withConfig()` method of it's
own `ServiceManager`, re-assigning it to the return value. This will allow
bootstrapping to provide a fully-configured service manager on completion, while
still aggregating services required at initialization.
@mwillbanks
Copy link
Contributor

Missing the changelog file :)

@weierophinney
Copy link
Member Author

changelog added, @mwillbanks . :)

@mwillbanks mwillbanks merged commit 14b87a2 into zendframework:develop Oct 2, 2015
mwillbanks added a commit that referenced this pull request Oct 2, 2015
mwillbanks added a commit that referenced this pull request Oct 2, 2015
@weierophinney weierophinney deleted the feature/service-manager-v3 branch October 2, 2015 16:37
weierophinney added a commit that referenced this pull request Jan 21, 2016
- Merged it with the #8 changelog.
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.

3 participants