Per #155, When using the factory, particularly with the InputFilterAbstractServiceFactory, the plugin managers used with the default filter and validator chains should be used with all newly created inputs, as these will have any custom services registered (vs. those that are in the initially created inputs, which are unconfigured).
This means that:
For cases where the instance was pulled from the InputFilterManager, we need to inject the filter and validator chains with the plugin managers pulled from the default instances; if the chain does not exist, we clone the default instance.
For other instances, we need to simply clone the default filter and validator chains (which are empty, but have the configured filter and validator plugin managers).
This patch also contains two unrelated fixes, but they are included so that the test suite will actually pass under PHP 7.2:
An update to the CollectionInputFilter::isValid signature to match that of InputFilterInterface::isValid.
An update to some tests that used the EmailAddress validator; this validator uses constants deprecated in PHP 7.2, which raised errors during testing. These have each been updated to use the Digits validator instead, which is fully compatible.
Per #155, When using the factory, particularly with the
InputFilterAbstractServiceFactory
, the plugin managers used with the default filter and validator chains should be used with all newly created inputs, as these will have any custom services registered (vs. those that are in the initially created inputs, which are unconfigured).This means that:
InputFilterManager
, we need to inject the filter and validator chains with the plugin managers pulled from the default instances; if the chain does not exist, we clone the default instance.This patch also contains two unrelated fixes, but they are included so that the test suite will actually pass under PHP 7.2:
CollectionInputFilter::isValid
signature to match that ofInputFilterInterface::isValid
.EmailAddress
validator; this validator uses constants deprecated in PHP 7.2, which raised errors during testing. These have each been updated to use the Digits validator instead, which is fully compatible.Fixes #155.