diff --git a/.gitignore b/.gitignore index 3300e50a..d1be6c97 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ composer.lock # phpunit 10+ /.phpunit.cache +.phpunit.result.cache diff --git a/.phpunit.result.cache b/.phpunit.result.cache deleted file mode 100644 index 01b59c90..00000000 --- a/.phpunit.result.cache +++ /dev/null @@ -1 +0,0 @@ -{"version":1,"defects":{"Symplify\\PHPStanExtensions\\Tests\\ErrorFormatter\\SymplifyErrorFormatterTest::testFormatErrors":4,"Symplify\\PHPStanExtensions\\Tests\\TypeExtension\\FuncCall\\NativeFunctionDynamicFunctionReturnTypeExtension\\NativeFunctionDynamicFunctionReturnTypeExtensionTest::testAsserts":4,"Symplify\\PHPStanExtensions\\Tests\\TypeExtension\\MethodCall\\ContainerGetReturnTypeExtension\\ContainerGetReturnTypeExtensionTest::testAsserts":4,"Symplify\\PHPStanExtensions\\Tests\\TypeExtension\\MethodCall\\SplFileInfoTolerantReturnTypeExtension\\SplFileInfoTolerantReturnTypeExtensionTest::testAsserts":4},"times":{"Symplify\\PHPStanExtensions\\Tests\\ErrorFormatter\\SymplifyErrorFormatterTest::testFormatErrors":0.002,"Symplify\\PHPStanExtensions\\Tests\\TypeExtension\\FuncCall\\NativeFunctionDynamicFunctionReturnTypeExtension\\NativeFunctionDynamicFunctionReturnTypeExtensionTest::testAsserts":0.59,"Symplify\\PHPStanExtensions\\Tests\\TypeExtension\\MethodCall\\ContainerGetReturnTypeExtension\\ContainerGetReturnTypeExtensionTest::testAsserts":0,"Symplify\\PHPStanExtensions\\Tests\\TypeExtension\\MethodCall\\SplFileInfoTolerantReturnTypeExtension\\SplFileInfoTolerantReturnTypeExtensionTest::testAsserts":0}} \ No newline at end of file diff --git a/phpunit.xml b/phpunit.xml index 3b137e28..a5069ec9 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,6 +1,12 @@ - - - tests - + + + tests + diff --git a/rector.php b/rector.php index 47344bac..f1508dcd 100644 --- a/rector.php +++ b/rector.php @@ -3,33 +3,12 @@ declare(strict_types=1); use Rector\Config\RectorConfig; -use Rector\PHPUnit\Set\PHPUnitSetList; -use Rector\Set\ValueObject\LevelSetList; -use Rector\Set\ValueObject\SetList; -return static function (RectorConfig $rectorConfig): void { - $rectorConfig->sets([ - PHPUnitSetList::PHPUNIT_100, - SetList::CODE_QUALITY, - SetList::DEAD_CODE, - LevelSetList::UP_TO_PHP_81, - SetList::CODING_STYLE, - SetList::TYPE_DECLARATION, - SetList::NAMING, - SetList::PRIVATIZATION, - SetList::EARLY_RETURN, - PHPUnitSetList::PHPUNIT_CODE_QUALITY, - ]); - - $rectorConfig->paths([ - __DIR__ . '/src', - __DIR__ . '/tests', - ]); - - $rectorConfig->importNames(); - - $rectorConfig->skip([ +return RectorConfig::configure() + ->withPaths([__DIR__ . '/src', __DIR__ . '/tests']) + ->withPreparedSets(codeQuality: true, deadCode: true, naming: true, privatization: true, earlyReturn: true, codingStyle: true) + ->withRootFiles() + ->withSkip([ '*/Source/*', '*/Fixture/*', ]); -};