-
-
Notifications
You must be signed in to change notification settings - Fork 33
Fixed final class usage - again impossible to extend functionality #173
Description
Oh yeah, finally the package's new (not yet released) version will use interfaces for chains, so I can extend the functionality despite of final core chain classes.
Oh wait, no.
laminas-inputfilter/src/Input.php
Line 384 in 3c54077
| assert($chain instanceof ValidatorChain); |
So at some points of the package it won't work if I use a different chain (with the core interface). The Input factory supports the custom chain classes, but the code itself not. Is it planned to fix?
Some other places where the classes are fixed:
laminas-inputfilter/src/Input.php
Line 255 in 3c54077
| assert( |
laminas-inputfilter/src/Input.php
Line 267 in 3c54077
| $targetValidatorChain instanceof ValidatorChain |
laminas-inputfilter/src/Input.php
Line 350 in 3c54077
| assert($chain instanceof ValidatorChain); |
laminas-inputfilter/src/ArrayInput.php
Line 118 in 3c54077
| assert($chain instanceof ValidatorChain); |
laminas-inputfilter/src/FileInput.php
Line 179 in 3c54077
| assert($chain instanceof ValidatorChain); |
Why merge and getValidator method not added to the interface? With this the code really can support custom chain classes.
If you agree about it, I can help with PR.