Feature request
In phpstan/phpstan-src#3642 we added php version dependent narrowing for conditions checking PHP_VERSION_ID, like e.g. if (PHP_VERSION_ID >= 80000) {}.
there are more conditions which narrow the php version which could re-use the implemented logic to narrow the php-version in Scope. examples are
version_compare( PHP_VERSION, '8.4', '<' )
version_compare( PHP_VERSION, '8.4' ) === 1
maybe we can just re-write the AST in case version_compare is invoked with PHP_VERSION in one of the 2 version parameters?
https://phpstan.org/r/1eab8f33-e339-4c4a-addc-f1274d5d06a4
refs phpstan/phpstan-deprecation-rules#162
Feature request
In phpstan/phpstan-src#3642 we added php version dependent narrowing for conditions checking
PHP_VERSION_ID, like e.g.if (PHP_VERSION_ID >= 80000) {}.there are more conditions which narrow the php version which could re-use the implemented logic to narrow the php-version in Scope. examples are
version_compare( PHP_VERSION, '8.4', '<' )version_compare( PHP_VERSION, '8.4' ) === 1maybe we can just re-write the AST in case
version_compareis invoked withPHP_VERSIONin one of the 2 version parameters?https://phpstan.org/r/1eab8f33-e339-4c4a-addc-f1274d5d06a4
refs phpstan/phpstan-deprecation-rules#162