-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Conversation
👍 |
1 similar comment
👍 |
While I agree with the change, this is also a BC break, since your validator will now come with untranslated messages, and overriding the default 'NotEmpty' will become problematic without subclassing the 'Input' class. |
@Ocramius but this would not be a bug? I can't use the InputFilter component without ServiceManager, it's a big problem IMO, or maybe we should put |
@gabrielsch I'd rather fix the problem via a |
To be precise, |
Suggestion: test to see if |
ok @weierophinney, I'll finish that soon |
done @weierophinney , sorry for the delay 😄 |
Fixing prepended `NotEmpty` validator
Merged to develop for release with 2.4. |
…ugfix/input-not-empty Fixing prepended `NotEmpty` validator
When using
InputFilter
standalone (without dev dependencies), this is broken because this line callsValidatorPluginManager
, and this class inheritsAbstractPluginManager
, that issuggested
at composer.json, not required.Then the following error is thrown:
PHP Fatal error: Class 'Zend\ServiceManager\AbstractPluginManager' not found in /zf2/library/Zend/Validator/ValidatorPluginManager.php on line 16
I just changed the
prependByName
method (that uses PluginManager) toprependValidator
, instantiating the validator by hand.