Skip to content

Commit

Permalink
[TASK] Update to phpstan v2
Browse files Browse the repository at this point in the history
  • Loading branch information
bmack committed Nov 12, 2024
1 parent 0d5c3c5 commit af14274
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 28 deletions.
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
"maglnet/composer-require-checker": "^4.7.1",
"overtrue/phplint": "^9.0",
"phpstan/extension-installer": "^1.3.1",
"phpstan/phpstan": "^1.11.3",
"phpstan/phpstan-deprecation-rules": "^1.2.0",
"phpstan/phpstan-phpunit": "^1.4.0",
"phpstan/phpstan-strict-rules": "^1.6.0",
"phpstan/phpstan-symfony": "^1.4.3",
"phpstan/phpstan": "^2.0",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"phpstan/phpstan-strict-rules": "^2.0",
"phpstan/phpstan-symfony": "^2.0",
"phpunit/phpunit": "^10.1.3",
"symfony/finder": "^6.4 || ^7.0",
"symfony/process": "^6.4 || ^7.0"
Expand Down
5 changes: 1 addition & 4 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parameters:
level: max
level: 9
phpVersion: 80100
treatPhpDocTypesAsCertain: true

Expand All @@ -11,6 +11,3 @@ parameters:
excludePaths:
analyse:
- tests/Console/Style/SimpleStyle.php

stubFiles:
- stubs/Command.stub
2 changes: 1 addition & 1 deletion src/Console/Command/SetupCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private function getType(InputInterface $input): string
throw new RuntimeException(sprintf($composerManifestError, 'read')); // @codeCoverageIgnore
}

$composerManifest = \json_decode($composerManifest, true, 512, 0);
$composerManifest = \json_decode($composerManifest, true);
if ($composerManifest === false || !is_array($composerManifest)) {
throw new RuntimeException(sprintf($composerManifestError, 'decoded'));
}
Expand Down
16 changes: 0 additions & 16 deletions stubs/Command.stub

This file was deleted.

2 changes: 0 additions & 2 deletions tests/Unit/CsFixerConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ final class CsFixerConfigTest extends TestCase
{
public function testCreateReturnsCorrectClass(): void
{
/** @var object $csFixerConfig */
$csFixerConfig = CsFixerConfig::create();
self::assertInstanceOf(CsFixerConfig::class, $csFixerConfig);
self::assertTrue($csFixerConfig->getRiskyAllowed());
self::assertCount(52, $csFixerConfig->getRules());
}
Expand Down

0 comments on commit af14274

Please sign in to comment.