You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 30, 2020. It is now read-only.
Ensure validators config is honored in non-zend-mvc contexts
Per https://discourse.zendframework.com/t/validatormanager-not-calling-custom-validator-factory/109/5?u=matthew
the `input_filters` config key is not honored currently unless the
application is within a zend-mvc context. This is due to the fact that
`Zend\InputFilter\Module` wires configuration for the
`Zend\ModuleManager\Listener\ServiceListener` in order to push merged
service configuration into the plugin during bootstrap; no similar logic
is available when not in a zend-mvc context, however.
This patch fixes that situation by modifying the
`InputFilterPluginManagerFactory` to do the following:
- If a `ServiceListener` service exists, it returns the plugin manager
immediately (old behavior).
- Otherwise, it checks for the `config` service, and, if found, a
`input_filters` key with an array value. When found, it feeds that value
to a `Zend\ServiceManager\Config` instance and uses that to configure
the plugin manager before returning it.
0 commit comments