From ebc9ec259500af0147178f97720ea67a6c81cbd9 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Thu, 8 Feb 2024 00:35:00 +0100 Subject: [PATCH] Bump deps (#5) * bump deps * bump deps --- composer.json | 14 ++++++-------- ecs.php | 17 +++++------------ rector.php | 32 +++++++------------------------- 3 files changed, 18 insertions(+), 45 deletions(-) diff --git a/composer.json b/composer.json index 1ef03f2..92d9371 100644 --- a/composer.json +++ b/composer.json @@ -5,19 +5,17 @@ "require": { "php": ">=8.1", "clue/ndjson-react": "^1.3", - "fidry/cpu-core-counter": "^0.4.0 || ^0.5.1", + "fidry/cpu-core-counter": "^0.5.1|^1.1", "nette/utils": "^3.2|^4.0", "react/child-process": "^0.6.5", - "react/event-loop": "^1.3", - "react/socket": "^1.12", + "react/event-loop": "^1.5", + "react/socket": "^1.15", "symfony/console": "^6.2|^7.0" }, "require-dev": { - "phpstan/extension-installer": "^1.3", "phpunit/phpunit": "^10.5", - "rector/rector": "^0.18.13", - "symplify/easy-coding-standard": "^12.0", - "symplify/phpstan-extensions": "^11.4", + "rector/rector": "^1.0", + "symplify/easy-coding-standard": "^12.1", "tomasvotruba/class-leak": "^0.2.6" }, "autoload": { @@ -33,7 +31,7 @@ "scripts": { "check-cs": "vendor/bin/ecs check --ansi", "fix-cs": "vendor/bin/ecs check --fix --ansi", - "phpstan": "vendor/bin/phpstan analyse --ansi --error-format symplify", + "phpstan": "vendor/bin/phpstan analyse --ansi", "rector": "vendor/bin/rector process --dry-run --ansi" }, "config": { diff --git a/ecs.php b/ecs.php index 41f7398..00d9e79 100644 --- a/ecs.php +++ b/ecs.php @@ -3,19 +3,12 @@ declare(strict_types=1); use Symplify\EasyCodingStandard\Config\ECSConfig; -use Symplify\EasyCodingStandard\ValueObject\Set\SetList; -return static function (ECSConfig $ecsConfig): void { - $ecsConfig->paths([ +return ECSConfig::configure() + ->withPaths([ __DIR__ . '/config', - __DIR__ . '/ecs.php', - __DIR__ . '/rector.php', __DIR__ . '/src', __DIR__ . '/tests', - ]); - - $ecsConfig->sets([ - SetList::COMMON, - SetList::PSR_12, - ]); -}; + ]) + ->withRootFiles() + ->withPreparedSets(common: true, psr12: true); diff --git a/rector.php b/rector.php index 114d522..41f1359 100644 --- a/rector.php +++ b/rector.php @@ -3,34 +3,16 @@ 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([ - SetList::CODE_QUALITY, - SetList::DEAD_CODE, - // @todo bump to PHP 8.1 - LevelSetList::UP_TO_PHP_80, - SetList::CODING_STYLE, - SetList::TYPE_DECLARATION, - SetList::NAMING, - SetList::PRIVATIZATION, - SetList::EARLY_RETURN, - PHPUnitSetList::PHPUNIT_CODE_QUALITY, - ]); - - $rectorConfig->paths([ +return RectorConfig::configure() + ->withPreparedSets(codeQuality: true, deadCode: true, codingStyle: true, naming: true, privatization: true, earlyReturn: true) + ->withPaths([ __DIR__ . '/config', __DIR__ . '/src', __DIR__ . '/tests', - ]); - - $rectorConfig->importNames(); - - $rectorConfig->skip([ + ]) + ->withImportNames(removeUnusedImports: true) + ->withPhpSets() + ->withSkip([ '*/Source/*', - '*/Fixture/*', ]); -};