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

Do not re-inject filter/validator chains of inputs pulled from plugin manager #151

Conversation

weierophinney
Copy link
Member

As reported in #8, a change in #2 now causes inputs pulled from the plugin manager within Factory::createInput() to be injected with the default filter and validator chains composed in the Factory. This can cause filter and validator chains created during construction or within the input's factory to be overwritten entirely.

This patch adds conditions to skip injection of the default filter and validator chains on inputs pulled from the input filter manager, while retaining the logic introduced in #2 to allow values in the $inputSpecification to further configure the instance.

Fixes #8.

… manager

As reported in zendframework#8, a change in zendframework#2 now causes inputs pulled from the
plugin manager within `Factory::createInput()` to be injected with the
default filter and validator chains composed in the `Factory`.
This can cause filter and validator chains created during construction
or within the input's factory to be overwritten entirely.

This patch adds conditions to skip injection of the default filter and
validator chains on inputs pulled from the input filter manager, while
retaining the logic introduced in zendframework#2 to allow values in the
`$inputSpecification` to further configure the instance.
@weierophinney weierophinney merged commit a89aec2 into zendframework:master Nov 7, 2017
weierophinney added a commit that referenced this pull request Nov 7, 2017
weierophinney added a commit that referenced this pull request Nov 7, 2017
weierophinney added a commit that referenced this pull request Nov 7, 2017
@weierophinney weierophinney deleted the hotfix/8-overwriting-chains-bug branch November 7, 2017 16:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant