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

Fixes issue with using InputFilterAbstractFactory with application services #110

Merged
merged 1 commit into from
Jun 11, 2016

Conversation

weierophinney
Copy link
Member

As reported in #123, under zend-servicemanager v2, the InputFilterAbstractFactory raises a fatal error when calling getServiceLocator() if the container passed to the abstract factory is not a plugin manager, but instead the application-level service container.

This patch updates the implementation to add some detection to determine if the container is a plugin manager when used under v2, and, if so, only then attempt to pull the parent service container. Additionally, it will now use itself if no parent container is present (this will typically cause the canCreate() test to fail anyways).

All typehints on ServiceLocatorInterface were modified to ContainerInterface unless they were part of an existing interface definition, to ensure inner consistency, and forwards compatibility with v3.

…rvices

As reported in zendframework#123, under zend-servicemanager v2, the
`InputFilterAbstractFactory` raises a fatal error when calling
`getServiceLocator()` if the container passed to the abstract factory is not a
plugin manager, but instead the application-level service container.

This patch updates the implementation to add some detection to determine if the
container is a plugin manager when used under v2, and, if so, only then attempt
to pull the parent service container. Additionally, it will now use itself if no
parent container is present (this will typically cause the `canCreate()` test to
fail anyways).

All typehints on `ServiceLocatorInterface` were modified to `ContainerInterface`
unless they were part of an existing interface definition, to ensure inner
consistency, and forwards compatibility with v3.
@weierophinney weierophinney added this to the 2.7.2 milestone Jun 11, 2016
@weierophinney weierophinney self-assigned this Jun 11, 2016
@weierophinney weierophinney merged commit 69d57a4 into zendframework:master Jun 11, 2016
weierophinney added a commit that referenced this pull request Jun 11, 2016
weierophinney added a commit that referenced this pull request Jun 11, 2016
weierophinney added a commit that referenced this pull request Jun 11, 2016
@weierophinney weierophinney deleted the hotfix/123 branch June 11, 2016 19:37
@ppeiris
Copy link

ppeiris commented Jul 15, 2016

Hi Mathew

I still get the following error !

Fatal error: Class 'Zend\InputFiler\InputFilterAbstractServiceFactory' not found in /var/ftridp/vendor/zendframework/zend-servicemanager/src/ServiceManager.php on line 314

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants