Skip to content
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

refactor: Enable phpunit 10 attribute Rector rules #9015

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,9 @@
use Rector\EarlyReturn\Rector\Return_\PreparedValueToEarlyReturnRector;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\Php70\Rector\FuncCall\RandomFunctionRector;
use Rector\Php80\Rector\Class_\AnnotationToAttributeRector;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\Php80\Rector\FunctionLike\MixedTypeRector;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
use Rector\PHPUnit\AnnotationsToAttributes\Rector\Class_\AnnotationWithValueToAttributeRector;
use Rector\PHPUnit\AnnotationsToAttributes\Rector\Class_\CoversAnnotationWithValueToAttributeRector;
use Rector\PHPUnit\AnnotationsToAttributes\Rector\ClassMethod\DataProviderAnnotationToAttributeRector;
use Rector\PHPUnit\AnnotationsToAttributes\Rector\ClassMethod\DependsAnnotationWithValueToAttributeRector;
use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector;
Expand Down Expand Up @@ -176,13 +171,6 @@

// Unnecessary (string) is inserted
NullToStrictStringFuncCallArgRector::class,

// PHPUnit 10 (requires PHP 8.1) features
DataProviderAnnotationToAttributeRector::class,
DependsAnnotationWithValueToAttributeRector::class,
AnnotationWithValueToAttributeRector::class,
AnnotationToAttributeRector::class,
CoversAnnotationWithValueToAttributeRector::class,
])
// auto import fully qualified class names
->withImportNames(removeUnusedImports: true)
Expand Down
5 changes: 2 additions & 3 deletions system/Test/DatabaseTestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Config\Database;
use Config\Migrations;
use Config\Services;
use PHPUnit\Framework\Attributes\AfterClass;

/**
* DatabaseTestTrait
Expand Down Expand Up @@ -228,14 +229,12 @@ public function seed(string $name)
// --------------------------------------------------------------------
// Utility
// --------------------------------------------------------------------

/**
* Reset $doneMigration and $doneSeed
*
* @afterClass
*
* @return void
*/
#[AfterClass]
public static function resetMigrationSeedCount()
{
self::$doneMigration = false;
Expand Down
Loading