diff --git a/.github/inactive_workflows/test_lowest_dependencies.yaml b/.github/inactive_workflows/test_lowest_dependencies.yaml index e8c8dc0e64d..44aca04999f 100644 --- a/.github/inactive_workflows/test_lowest_dependencies.yaml +++ b/.github/inactive_workflows/test_lowest_dependencies.yaml @@ -16,13 +16,8 @@ jobs: # see https://github.com/shivammathur/setup-php - uses: shivammathur/setup-php@v2 with: - php-version: 7.2 + php-version: 7.3 coverage: none - # report phpunit errors into files-changed PR tab - # https://github.com/actions/toolkit/blob/master/docs/problem-matchers.md - - name: Setup Problem Matchers for PHPUnit - run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - - run: composer update --no-progress --ansi # --prefer-lowest + - run: composer update --no-progress --ansi --prefer-lowest - run: vendor/bin/phpunit diff --git a/composer.json b/composer.json index 280ac1c6204..519192f7ca1 100644 --- a/composer.json +++ b/composer.json @@ -14,36 +14,34 @@ "ext-json": "*", "composer/xdebug-handler": "^1.4", "doctrine/annotations": "^1.11", - "doctrine/inflector": "^1.4|^2.0", + "doctrine/inflector": "^2.0", "jean85/pretty-package-versions": "^1.5.1", "nette/robot-loader": "^3.2", "nette/utils": "^3.1", "nikic/php-parser": "^4.10.3", "phpstan/phpdoc-parser": "^0.4.9", - "phpstan/phpstan": "^0.12.52", + "phpstan/phpstan": "^0.12.59", "phpstan/phpstan-phpunit": "^0.12.16", "psr/simple-cache": "^1.0", - "sebastian/diff": "^3.0|^4.0", + "sebastian/diff": "^4.0", "symfony/cache": "^4.4.8|^5.1", "symfony/console": "^4.4.8|^5.1", "symfony/dependency-injection": "^4.4.8|^5.1", "symfony/finder": "^4.4.8|^5.1", "symfony/http-kernel": "^4.4.8|^5.1", - "symplify/autowire-array-parameter": "dev-master", - "symplify/skipper": "dev-master", - "symplify/composer-json-manipulator": "dev-master", - "symplify/console-color-diff": "dev-master", - "symplify/package-builder": "dev-master", - "symplify/symfony-php-config": "dev-master", - "symplify/php-config-printer": "dev-master", - "symplify/set-config-resolver": "dev-master", - "symplify/simple-php-doc-parser": "dev-master", - "symplify/smart-file-system": "dev-master", - "symplify/rule-doc-generator": "dev-master", + "symplify/autowire-array-parameter": "^9.0.1", + "symplify/skipper": "^9.0.1", + "symplify/package-builder": "^9.0.1", + "symplify/simple-php-doc-parser": "^9.0.1", + "symplify/smart-file-system": "^9.0.1", + "symplify/rule-doc-generator": "^9.0.1", + "symplify/set-config-resolver": "^9.0.1", + "symplify/console-color-diff": "^9.0.1", + "symplify/symfony-php-config": "^9.0.1", "webmozart/assert": "^1.9" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.16", + "friendsofphp/php-cs-fixer": "^2.17", "nette/application": "^3.0", "nette/di": "^3.0", "nette/forms": "^3.0", @@ -51,13 +49,12 @@ "php-parallel-lint/php-parallel-lint": "^1.2", "phpunit/phpunit": "^8.5|^9.2", "psr/event-dispatcher": "^1.0", - "symplify/changelog-linker": "dev-master", - "symplify/easy-coding-standard": "dev-master", - "symplify/coding-standard": "dev-master", - "symplify/easy-testing": "dev-master", - "symplify/phpstan-extensions": "dev-master", - "symplify/markdown-diff": "dev-master", - "symplify/phpstan-rules": "dev-master", + "symplify/changelog-linker": "^9.0.1", + "symplify/easy-coding-standard": "^9.0.1", + "symplify/coding-standard": "^9.0.1", + "symplify/easy-testing": "^9.0.1", + "symplify/phpstan-extensions": "^9.0.1", + "symplify/phpstan-rules": "^9.0.1", "tracy/tracy": "^2.7" }, "replace": { diff --git a/config/set/code-quality.php b/config/set/code-quality.php index e42e1d615c8..dc8d3f42aeb 100644 --- a/config/set/code-quality.php +++ b/config/set/code-quality.php @@ -158,7 +158,7 @@ return static function (ContainerConfigurator $containerConfigurator): void { 'mbsubstr' => 'mb_substr', ], ], - ]); + ]); $services->set(SetTypeToCastRector::class); $services->set(LogicalToBooleanRector::class); $services->set(VarToPublicPropertyRector::class); diff --git a/phpstan.neon b/phpstan.neon index 05439bd03b2..48035c88921 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -9,17 +9,6 @@ includes: - vendor/symplify/phpstan-rules/config/services/services.neon - vendor/symplify/phpstan-rules/packages/cognitive-complexity/config/cognitive-complexity-services.neon - - vendor/symplify/phpstan-rules/config/symplify-rules/array-rules.neon - - vendor/symplify/phpstan-rules/config/symplify-rules/code-complexity-rules.neon - - vendor/symplify/phpstan-rules/config/symplify-rules/static-rules.neon - - vendor/symplify/phpstan-rules/config/symplify-rules/doctrine-rules.neon - - vendor/symplify/phpstan-rules/config/symplify-rules/naming-rules.neon - - vendor/symplify/phpstan-rules/config/symplify-rules/regex-rules.neon - - vendor/symplify/phpstan-rules/config/symplify-rules/symfony-rules.neon - - vendor/symplify/phpstan-rules/config/symplify-rules/test-rules.neon - - vendor/symplify/phpstan-rules/config/symplify-rules/services-rules.neon - - vendor/symplify/phpstan-rules/config/symplify-rules/string-to-constant-rules.neon - services: - class: Symplify\PHPStanRules\Rules\RequireClassTypeInClassMethodByTypeRule diff --git a/rules/downgrade-php74/src/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php b/rules/downgrade-php74/src/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php index c63c02cd761..7799c70ae2f 100644 --- a/rules/downgrade-php74/src/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php +++ b/rules/downgrade-php74/src/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php @@ -21,10 +21,7 @@ final class DowngradeFreadFwriteFalsyToNegationRector extends AbstractRector /** * @var string[] */ - private const FUNC_FREAD_FWRITE = [ - 'fread', - 'fwrite', - ]; + private const FUNC_FREAD_FWRITE = ['fread', 'fwrite']; public function getRuleDefinition(): RuleDefinition { diff --git a/rules/downgrade-php80/src/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php b/rules/downgrade-php80/src/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php index e0244cd741a..d7d3a7eef9b 100644 --- a/rules/downgrade-php80/src/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php +++ b/rules/downgrade-php80/src/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php @@ -7,13 +7,13 @@ namespace Rector\DowngradePhp80\Rector\ClassMethod; use PhpParser\Node; use PhpParser\Node\Expr\Closure; use PhpParser\Node\Expr\ClosureUse; +use PhpParser\Node\Param; use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Function_; use Rector\Core\Rector\AbstractRector; use Rector\NodeTypeResolver\Node\AttributeKey; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; -use PhpParser\Node\Param; /** * @see \Rector\DowngradePhp80\Tests\Rector\ClassMethod\DowngradeTrailingCommasInParamUseRector\DowngradeTrailingCommasInParamUseRectorTest diff --git a/src/DependencyInjection/RectorContainerFactory.php b/src/DependencyInjection/RectorContainerFactory.php index 7b154fe3e2a..265c4424974 100644 --- a/src/DependencyInjection/RectorContainerFactory.php +++ b/src/DependencyInjection/RectorContainerFactory.php @@ -7,7 +7,7 @@ namespace Rector\Core\DependencyInjection; use Psr\Container\ContainerInterface; use Rector\Core\HttpKernel\RectorKernel; use Rector\Core\Stubs\StubLoader; -use Symplify\PackageBuilder\Console\Input\InputDetector; +use Symplify\PackageBuilder\Console\Input\StaticInputDetector; use Symplify\SmartFileSystem\SmartFileInfo; final class RectorContainerFactory @@ -20,7 +20,7 @@ final class RectorContainerFactory { // to override the configs without clearing cache $environment = 'prod' . random_int(1, 10000000); - $isDebug = InputDetector::isDebug(); + $isDebug = StaticInputDetector::isDebug(); $rectorKernel = new RectorKernel($environment, $isDebug); if ($configFileInfos !== []) {