laminas / laminas-inputfilter

Normalize and validate input sets from the web, APIs, the CLI, and more, including files
https://docs.laminas.dev/laminas-inputfilter/
BSD 3-Clause "New" or "Revised" License
41 stars 28 forks source link

Use typed properties for ValidatorChain & FilterChain in Input #78

Closed pascalheidmann closed 1 year ago

pascalheidmann commented 1 year ago
Q A
Documentation no
Bugfix no
BC Break yes
New Feature no
RFC no
QA no

Description

This PR will add property types for base Input class for $validatorChain and $filterChain properties. As those could be accessed in derived classes directly and not via their appropriate getters/setters this is breaking. The purpose of this PR is to remove confusion for phpstan (not sure about psalm) as it will detect a nullable property as technically it is null as long it isn't set or initialized via getValidatorChain()/getFilterChain().

Ocramius commented 1 year ago

This can't really be done, as it is a BC break for child classes.