-
Notifications
You must be signed in to change notification settings - Fork 265
PHPLIB-1369 Upgrade to PHPUnit 10 #1412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0010813
be20da8
cce7cc8
4a5c089
1123687
1b9d084
25bd456
3cac1d4
ccebc20
c04aa83
078bafd
9f59167
0d9ce99
2734c0b
829e2bb
03b1abb
08e1870
8236e3e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,10 @@ | |
use Rector\Config\RectorConfig; | ||
use Rector\DeadCode\Rector\ClassLike\RemoveAnnotationRector; | ||
use Rector\Php70\Rector\StmtsAwareInterface\IfIssetToCoalescingRector; | ||
use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector; | ||
use Rector\Php80\Rector\Switch_\ChangeSwitchToMatchRector; | ||
use Rector\PHPUnit\PHPUnit100\Rector\Class_\StaticDataProviderClassMethodRector; | ||
use Rector\PHPUnit\Set\PHPUnitSetList; | ||
use Rector\Set\ValueObject\LevelSetList; | ||
|
||
return static function (RectorConfig $rectorConfig): void { | ||
|
@@ -16,13 +18,17 @@ | |
]); | ||
|
||
// Modernize code | ||
$rectorConfig->sets([LevelSetList::UP_TO_PHP_74]); | ||
$rectorConfig->sets([ | ||
LevelSetList::UP_TO_PHP_74, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this have been bumped to PHP 8.1 in 24214b6? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The PHP 8.1 rules have to be tuned. Some like ReadOnlyPropertyRector and ClassPropertyAssignToConstructorPromotionRector need to be challenged. |
||
PHPUnitSetList::PHPUNIT_100, | ||
]); | ||
|
||
$rectorConfig->rule(ChangeSwitchToMatchRector::class); | ||
$rectorConfig->rule(StaticDataProviderClassMethodRector::class); | ||
|
||
// phpcs:disable Squiz.Arrays.ArrayDeclaration.KeySpecified | ||
$rectorConfig->skip([ | ||
RemoveExtraParametersRector::class, | ||
// Do not use ternaries extensively | ||
IfIssetToCoalescingRector::class, | ||
ChangeSwitchToMatchRector::class => [ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about removing the output of skipped tests, so I agree with this change 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's also, the
-v
option isn't available on PHPUnit 10