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

[WIP] Refactor with new service and event manager #22

Conversation

ezimuel
Copy link
Contributor

@ezimuel ezimuel commented Oct 14, 2015

This PR contains the refactoring of zend-cache using the new zend-servicemanager and zend-eventmanager of ZF3.

NOTE: this PR is a work in progress, please don't merge!

To do:

  • Fix the usage in unit tests of the removed functions getEvents() and getListeners() from EventManger;
  • Fix the unit test;

@ezimuel
Copy link
Contributor Author

ezimuel commented Oct 23, 2015

@weierophinney I solved all the error in the unit tests except for this one:

1) ZendTest\Cache\Service\StorageCacheAbstractServiceFactoryTest::testCanRetrieveCacheByName
Zend\ServiceManager\Exception\ServiceNotCreatedException: Service with name "Foo" could not be created. Reason: Plugin of type "Zend\Cache\Storage\Plugin\Serializer" already registered

zend-cache/vendor/zendframework/zend-servicemanager/src/ServiceManager.php:566
zend-cache/vendor/zendframework/zend-servicemanager/src/ServiceManager.php:181
zend-cache/test/Service/StorageCacheAbstractServiceFactoryTest.php:64

Caused by
Zend\Cache\Exception\LogicException: Plugin of type "Zend\Cache\Storage\Plugin\Serializer" already registered

zend-cache/src/Storage/Adapter/AbstractAdapter.php:279
zend-cache/src/StorageFactory.php:122
zend-cache/src/Service/StorageCacheAbstractServiceFactory.php:58
zend-cache/vendor/zendframework/zend-servicemanager/src/ServiceManager.php:559
zend-cache/vendor/zendframework/zend-servicemanager/src/ServiceManager.php:181
zend-cache/test/Service/StorageCacheAbstractServiceFactoryTest.php:64

Can you have a look? Thanks.

@weierophinney
Copy link
Member

One quick comment: zend-mvc standardizes on config (all lowercase) for the configuration service. I'm updating that locally as I investigate the errors and failures.

@@ -42,25 +47,7 @@ class PatternPluginManager extends AbstractPluginManager
protected $shareByDefault = false;
Copy link
Member

Choose a reason for hiding this comment

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

Ugh - found another slight BC break in SM v3: this becomes $sharedByDefault (note shared vs share). That change fixes a few errors.

@weierophinney weierophinney merged commit cec6ebb into zendframework:develop Oct 29, 2015
weierophinney added a commit that referenced this pull request Oct 29, 2015
…nager

[WIP] Refactor with new service and event manager
weierophinney added a commit that referenced this pull request Oct 29, 2015
weierophinney added a commit that referenced this pull request Oct 29, 2015
@marc-mabe marc-mabe modified the milestones: 2.6.0, 3.0.0 Feb 12, 2016
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