atm I try to implement a phpstan rule which detects "always false" #[RequiresPhp(....)] uses in the codebase by comparing it against the composer.json version constraints.
to get this working, I need to mimic phpunits php version parsing and checking.
therefore I need to use PharIo\Version, but combine it with some additional phpunit specific fallback logic.
for tooling which tries to be compatible with phpunit, it would be great if such logic could be extracted. that way I don't need to re-implement it and keep track of possible changes in the future.
do you think this would be possible?
(I would need a PHP 7.4 compatible version though)
my current work-in-progress with duplicated phpunit version parsing is here: phpstan/phpstan-phpunit#269
atm I try to implement a phpstan rule which detects "always false"
#[RequiresPhp(....)]uses in the codebase by comparing it against the composer.json version constraints.to get this working, I need to mimic phpunits php version parsing and checking.
therefore I need to use PharIo\Version, but combine it with some additional phpunit specific fallback logic.
for tooling which tries to be compatible with phpunit, it would be great if such logic could be extracted. that way I don't need to re-implement it and keep track of possible changes in the future.
do you think this would be possible?
(I would need a PHP 7.4 compatible version though)
my current work-in-progress with duplicated phpunit version parsing is here: phpstan/phpstan-phpunit#269