diff --git a/composer-dependency-analyser.php b/composer-dependency-analyser.php index cdfe59a..58942eb 100644 --- a/composer-dependency-analyser.php +++ b/composer-dependency-analyser.php @@ -20,23 +20,27 @@ // Adjusting scanned paths ->addPathToScan(__DIR__ . '/src', isDev: false) ->addPathToScan(__DIR__ . '/tests', isDev: true) - ->addPathToScan(__DIR__ . '/vendor', isDev: false) - ->addPathToExclude(__DIR__ . '/vendor/rector/rector') - ->addPathToExclude(__DIR__ . '/vendor/phpstan/phpstan') // applies only to directory scanning, not directly listed files ->setFileExtensions(['php']) // Ignoring errors in vendor directory - ->ignoreErrorsOnPath(__DIR__ . '/vendor', [ErrorType::SHADOW_DEPENDENCY]) - ->ignoreErrorsOnPath(__DIR__ . '/vendor', [ErrorType::UNKNOWN_FUNCTION]) - ->ignoreErrorsOnPath(__DIR__ . '/vendor', [ErrorType::UNKNOWN_CLASS]) - ->ignoreErrorsOnPath(__DIR__ . '/vendor', [ErrorType::DEV_DEPENDENCY_IN_PROD]) ->ignoreErrorsOnPath(__DIR__ . '/src', [ErrorType::DEV_DEPENDENCY_IN_PROD]) // do not complain about some modules ->ignoreErrorsOnPackage('mimmi20/coding-standard', [ErrorType::UNUSED_DEPENDENCY]) ->ignoreErrorsOnPackage('phpstan/extension-installer', [ErrorType::UNUSED_DEPENDENCY]) ->ignoreErrorsOnPackage('phpstan/phpstan-deprecation-rules', [ErrorType::UNUSED_DEPENDENCY]) + ->ignoreErrorsOnPackage('ergebnis/composer-normalize', [ErrorType::UNUSED_DEPENDENCY]) + ->ignoreErrorsOnPackage('infection/infection', [ErrorType::UNUSED_DEPENDENCY]) + ->ignoreErrorsOnPackage('phpstan/phpstan', [ErrorType::UNUSED_DEPENDENCY]) + ->ignoreErrorsOnPackage('rector/rector', [ErrorType::UNUSED_DEPENDENCY]) + ->ignoreErrorsOnPackage('shipmonk/composer-dependency-analyser', [ErrorType::UNUSED_DEPENDENCY]) + ->ignoreErrorsOnPackage('symplify/phpstan-rules', [ErrorType::UNUSED_DEPENDENCY]) + ->ignoreErrorsOnPackage('tomasvotruba/cognitive-complexity', [ErrorType::UNUSED_DEPENDENCY]) + ->ignoreErrorsOnPackage('tomasvotruba/type-coverage', [ErrorType::UNUSED_DEPENDENCY]) + ->ignoreErrorsOnPackage('tomasvotruba/unused-public', [ErrorType::UNUSED_DEPENDENCY]) + ->ignoreErrorsOnPackage('phpstan/phpstan-phpunit', [ErrorType::UNUSED_DEPENDENCY]) + ->ignoreErrorsOnPackage('rector/type-perfect', [ErrorType::UNUSED_DEPENDENCY]) ->ignoreErrorsOnPackage( 'jbelien/phpstan-sarif-formatter', [ErrorType::UNUSED_DEPENDENCY], diff --git a/composer.json b/composer.json index 9cb8be0..4d9a139 100644 --- a/composer.json +++ b/composer.json @@ -25,28 +25,21 @@ "psr/container": "^1.1.2" }, "require-dev": { - "ext-ctype": "*", - "ext-dom": "*", - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", "ergebnis/composer-normalize": "^2.52.0", - "infection/infection": "^0.34.0", + "infection/infection": "^0.34.1", "jbelien/phpstan-sarif-formatter": "^1.2.0", "laminas/laminas-modulemanager": "^2.19.0", "laminas/laminas-servicemanager": "^3.22.1", "mikey179/vfsstream": "^1.6.12", "mimmi20/coding-standard": "^6.2.5", - "nikic/php-parser": "^5.7.0", "phpstan/extension-installer": "^1.4.3", - "phpstan/phpstan": "^2.2.3", - "phpstan/phpstan-deprecation-rules": "^2.0.4", + "phpstan/phpstan": "^2.2.7", + "phpstan/phpstan-deprecation-rules": "^2.0.5", + "phpstan/phpstan-phpunit": "^2.0.16", "phpunit/phpunit": "^12.5.8", - "rector/rector": "^2.5.2", - "rector/type-perfect": "^2.1.4", + "rector/rector": "^2.5.9", + "rector/type-perfect": "^2.2.0", "shipmonk/composer-dependency-analyser": "^1.8.4", - "symfony/process": "^7.3.4", "symplify/phpstan-rules": "^14.10.0", "tomasvotruba/cognitive-complexity": "^1.2.0", "tomasvotruba/type-coverage": "^2.2.1", diff --git a/rector.php b/rector.php index 3d1e0a1..2c66aed 100644 --- a/rector.php +++ b/rector.php @@ -15,8 +15,7 @@ use Rector\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector; use Rector\DeadCode\Rector\If_\RemoveDeadInstanceOfRector; use Rector\DeadCode\Rector\StaticCall\RemoveParentCallWithoutParentRector; -use Rector\Php81\Rector\Array_\FirstClassCallableRector; -use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector; +use Rector\DeadCode\Rector\StmtsAwareInterface\RemoveDeadInstanceOfAssertRector; use Rector\PHPUnit\Set\PHPUnitSetList; use Rector\Set\ValueObject\LevelSetList; use Rector\Set\ValueObject\SetList; @@ -30,16 +29,15 @@ $rectorConfig->sets([ SetList::DEAD_CODE, LevelSetList::UP_TO_PHP_83, - PHPUnitSetList::PHPUNIT_100, + PHPUnitSetList::PHPUNIT_120, ]); $rectorConfig->skip( [ - NullToStrictStringFuncCallArgRector::class, RemoveDeadInstanceOfRector::class, - FirstClassCallableRector::class, RemoveAlwaysTrueIfConditionRector::class, RemoveParentCallWithoutParentRector::class, + RemoveDeadInstanceOfAssertRector::class, ], ); }; diff --git a/tests/View/Helper/ViteUrlTest.php b/tests/View/Helper/ViteUrlTest.php index 13fec20..3571d06 100644 --- a/tests/View/Helper/ViteUrlTest.php +++ b/tests/View/Helper/ViteUrlTest.php @@ -80,7 +80,7 @@ public function testFileWithWrongRenderer(): void $object = new ViteUrl($publicDir, $buildDir); - $view = $this->createMock(RendererInterface::class); + $view = self::createStub(RendererInterface::class); $object->setView($view);