zendframework / zend-inputfilter

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

Add zend-servicemanager as a required dependency #160

Closed settermjd closed 6 years ago

settermjd commented 6 years ago

Provide a narrative description of what you are trying to accomplish:

After being bitten by the bug in #119, where I couldn't use zend-inputfilter without zend-servicemanager, I'm proposing this PR, which makes zend-servicemanager a required dependency of zend-inputfilter. I can't claim to understand all the reasoning for not doing so to date (I'm happy to defer if necessary), but based on this experience it makes sense to make the change.

The above three questions are answered in https://github.com/zendframework/zend-inputfilter/issues/119#issue-172966930.

weierophinney commented 6 years ago

The original idea was that you could use the BaseInputFilter standalone, as you can then push all dependencies manually. However, we have no documentation on how to do that, and, as @Xerkus notes in one of the linked threads, the Input class itself pulls the NotEmpty validator as a plugin, requiring that at least the validators have zend-servicemanager around.

As such, I'm marking this as a bugfix, and will merge it for an upcoming 2.8.1 release.

weierophinney commented 6 years ago

Thanks, @settermjd!

settermjd commented 6 years ago

Thanks for sharing the extra background information, @weierophinney. It helps me understand it in a greater context. And thanks for merging the PR too.