diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0cf67f..d9d0131 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: php-version: "${{ matrix.php-version }}" ini-values: "${{ env.INI_VALUES }}" tools: composer-normalize,composer-require-checker,composer-unused - - uses: "ramsey/composer-install@v2" + - uses: "ramsey/composer-install@v3" - run: "composer validate --strict" - run: "composer-normalize --dry-run" @@ -54,7 +54,7 @@ jobs: coverage: "${{ matrix.code-coverage }}" php-version: "${{ matrix.php-version }}" ini-values: "${{ env.INI_VALUES }}" - - uses: "ramsey/composer-install@v2" + - uses: "ramsey/composer-install@v3" - run: "vendor/bin/phpunit --no-coverage --no-logging" if: ${{ matrix.code-coverage == 'none' }} @@ -79,7 +79,7 @@ jobs: coverage: "none" php-version: "${{ matrix.php-version }}" ini-values: "${{ env.INI_VALUES }}" - - uses: "ramsey/composer-install@v2" + - uses: "ramsey/composer-install@v3" - run: "vendor/bin/php-cs-fixer fix --verbose --dry-run --diff" @@ -98,6 +98,6 @@ jobs: coverage: "none" php-version: "${{ matrix.php-version }}" ini-values: "${{ env.INI_VALUES }}" - - uses: "ramsey/composer-install@v2" + - uses: "ramsey/composer-install@v3" - run: "vendor/bin/phpstan analyse --no-progress --error-format=github" diff --git a/composer.json b/composer.json index d804396..25b0cf6 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,8 @@ "friendsofphp/php-cs-fixer": "^3.64.0" }, "require-dev": { - "phpstan/phpstan": "^1.12.10", - "phpstan/phpstan-phpunit": "^1.4.0", + "phpstan/phpstan": "^2.0.1", + "phpstan/phpstan-phpunit": "^2", "phpunit/phpunit": "^11.4.3" }, "autoload": { diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 1b3fa75..3f19c6c 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,6 +1,13 @@ parameters: ignoreErrors: - - message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNotEmpty\\(\\) with false will always evaluate to false\\.$#" + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertNotEmpty\(\) with false will always evaluate to false\.$#' + identifier: staticMethod.impossibleType + count: 1 + path: tests/ConfigTest.php + + - + message: '#^Strict comparison using \!\=\= between false and array\{allow_mixed\: true\}\|array\{comment_type\: ''all_multiline''\}\|array\{const\: ''single'', property\: ''single'', method\: ''single''\}\|array\{default\: ''align_single_space''\}\|array\{include\: array\{''@internal''\}\}\|array\{keep_multiple_spaces_after_comma\: true\}\|array\{order\: array\{''use_trait'', ''constant_public'', ''constant_protected'', ''constant_private'', ''property'', ''construct'', ''destruct'', ''magic'', \.\.\.\}\}\|array\{spacing\: ''one''\}\|true will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue count: 1 path: tests/ConfigTest.php diff --git a/tests/ConfigTest.php b/tests/ConfigTest.php index a8796bf..6e1218b 100644 --- a/tests/ConfigTest.php +++ b/tests/ConfigTest.php @@ -4,7 +4,6 @@ namespace SlamCsFixer\Tests; -use PhpCsFixer\ConfigInterface; use PhpCsFixer\Fixer\DeprecatedFixerInterface; use PhpCsFixer\Fixer\FixerInterface; use PhpCsFixer\FixerFactory; @@ -23,7 +22,6 @@ public function testConfig(): void { $config = new Config(); - self::assertInstanceOf(ConfigInterface::class, $config); self::assertNotEmpty($config->getCustomFixers()); }