Closed eerison closed 8 months ago
Should be good if we could apply rules depending of phpunit version, because I faced other issue regarding it
for example this rule https://github.com/rectorphp/rector-phpunit/blob/main/docs/rector_rules_overview.md#withconsecutiverector is used in phpunit10 list, But I'm using phpuni9.
But in other hand there are rules in phpuni10 that I want to use in phpunit9 that remove some deprecations.
then at the moment I just see the solution to skip this rule :/, But if I do this I need to make this for others rules as well, like the dataproviders
For php version there is min php version interface.
For rules that just work for phpunit10 , does make sense we strick the minimum php version 8.1?
Sounds good :+1:
I wonder how it can happen people use PHPUnit 10 on PHP 8.0 though.
Hello
is there anyway to apply rules by
phpunit version
or justphp version
?As I can see in the doc this #[DataProvider] attribute is available in
phpunit 10
onlyhttps://github.com/rectorphp/rector-phpunit/blob/main/rules/AnnotationsToAttributes/Rector/ClassMethod/DataProviderAnnotationToAttributeRector.php
9.x - https://docs.phpunit.de/en/9.6/writing-tests-for-phpunit.html#data-providers 10.x - https://docs.phpunit.de/en/10.4/writing-tests-for-phpunit.html#data-providers