zendframework / zend-inputfilter

InputFilter component from Zend Framework
BSD 3-Clause "New" or "Revised" License
64 stars 50 forks source link

Fix invalid abstract service factory configuration #162

Closed codeaid closed 6 years ago

codeaid commented 6 years ago

This fixes #129.

Registration of InputFilterAbstractServiceFactory is currently invalid in ConfigProvider. Instead of the abstract_factories key being nested under dependencies it should be nested under input_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.

codeaid commented 6 years ago

@webimpress Sorry, not sure what you meant. Is something wrong with the config?

michalbundyra commented 6 years ago

@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.

codeaid commented 6 years ago

Documenation says "when using the configuration manager [..] the functionality is enabled by default" - I registered ConfigProvider in my Expressive application (installed using the instructions on the project homepage) and I wasn't able to use the abstract factory. How does it get enabled by default then?

Edit: Also, what's the purpose of having this section added to dependencies if it's not even invoked?

froschdesign commented 6 years ago

Fix is okay! 👍

(Btw. the same problem in zend-form.)

codeaid commented 6 years ago

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. On a side note - would you want me to fix this issue in zend-form too while I'm at it, @froschdesign?

froschdesign commented 6 years ago

@codeaid

would you want me to fix this issue in zend-form too while I'm at it

That would be awesome! 👍

weierophinney commented 6 years ago

Thanks, @codeaid!

codeaid commented 6 years ago

Thanks, @weierophinney! Sorry, I haven't had time to fix this issue in zend-form. Been busy with things other than PHP.