-
Notifications
You must be signed in to change notification settings - Fork 50
Deprecate BaseInputFilter and fix for BaseInputFilter::add() contract violation #18
Deprecate BaseInputFilter and fix for BaseInputFilter::add() contract violation #18
Conversation
For v3 |
c793ff6
to
3b0d954
Compare
42f5690
to
88bdf4a
Compare
Please mark as a |
@Martin-P Again. There is no BC Break. This PR fix BaseInputFilter::add does not allow input specifications (array) as the interface defines. |
395f478
to
564f4c0
Compare
… violation InputFlterInterface::add() specify array (input specification format) as an allowed type for $input. BaseInputFilter::add() throws exception for this case. This commit promote the logic present in InputFilter to BaseInputFilter so BaseInputFilter becomes compatible with Interface contract. Due InputFilter allow Traversable object, and Factory (underlying logic) allows InputProviderInterface objects then I decided promote all this types to the Interface too. With this change BaseInputFilter is equal to InputFilter so BaseInputFilter has been declared as deprecated while InputFilter is preserved because his name is more relevant. All of this is for to preserve the backward compatibility.
since 2.2.0 `@deprecated` annotations has the same effect of `@codeCoverageIgnore` This is not good because there are critical classes in this project need to be sure are tested even if they are marked as deprecated.
564f4c0
to
881abb3
Compare
I totally disagree with this. The reason |
I've created #31 for remove array from interface contract (which could be see as a BC break) |
InputFlterInterface::add() specify array (input specification format) as an allowed type for $input. BaseInputFilter::add() throws exception for this case.
This commit promote the logic present in InputFilter to BaseInputFilter so BaseInputFilter becomes compatible with Interface contract.
Due InputFilter allow Traversable object, and Factory (underlying logic) allows InputProviderInterface objects then I decided promote all this types to the Interface too.
With this change BaseInputFilter is equal to InputFilter so BaseInputFilter has been declared as deprecated while InputFilter is preserved because his name is more relevant.
All of this is for to preserve the backward compatibility.