This PR makes it possible to dynamically change the PHPStan configuration based on the PHP version. This is required for an upcoming PR that introduces special handling for enums — on PHP 7.1 enums don't exist and so PHPStan doesn't know about the UnitEnum/BackedEnum interfaces
Goal
This PR makes it possible to dynamically change the PHPStan configuration based on the PHP version. This is required for an upcoming PR that introduces special handling for enums — on PHP 7.1 enums don't exist and so PHPStan doesn't know about the
UnitEnum
/BackedEnum
interfacesDesign
This is the approach used by PHPStan itself for conditionally ignoring errors