-
Notifications
You must be signed in to change notification settings - Fork 50
Fix invalid abstract service factory configuration #162
Fix invalid abstract service factory configuration #162
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codeaid It looks like desired behaviour, please see:
https://docs.zendframework.com/zend-inputfilter/specs/#setup
@webimpress Sorry, not sure what you meant. Is something wrong with the config? |
@codeaid Documentation says that you have to add it manually in your configuration when you using zend-mvc v2. With v3 or expressive the configuration is slightly different and your change is not needed, imho. |
Documenation says "when using the configuration manager [..] the functionality is enabled by default" - I registered Edit: |
CHANGELOG.md
Outdated
- Nothing. | ||
- [#129](https://github.com/zendframework/zend-inputfilter/pull/129) fixes | ||
incorrect abstract service factory registration in `ConfigProvider`as per | ||
the [latest documentation](https://zendframework.github.io/zend-inputfilter/specs/#setup). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the correct link for documentation: https://docs.zendframework.com/zend-inputfilter/specs/#setup
Fix is okay! 👍 (Btw. the same problem in zend-form.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codeaid @froschdesign Oh, yeah... sorry you have right. The fix is right 👍 We creates another 'service manager' for input filters, and the abstract factory should be registered there.
Ah, I thought I was going crazy for a moment! Glad I can be of help after all. I force-pushed the updated link in the changelog to avoid duplicate commits. Everything should be alright now. |
That would be awesome! 👍 |
Additionally, `s/129/162/`, as the latter is the actual pull request introducing the change (while the former is the issue that prompted it).
Thanks, @codeaid! |
Thanks, @weierophinney! Sorry, I haven't had time to fix this issue in zend-form. Been busy with things other than PHP. |
This fixes #129.
Registration of
InputFilterAbstractServiceFactory
is currently invalid inConfigProvider
. Instead of theabstract_factories
key being nested underdependencies
it should be nested underinput_filters
.This pull request corrects the behaviour and allows using the service with no manual changes required when using the library in a Zend Expressive project.
master
branch, and submit against that branch.Is this really needed? I've included tests that validate the current (correct) behaviour.
CHANGELOG.md
entry for the fix.