Skip to content

Commit af14274

Browse files
committed
[TASK] Update to phpstan v2
1 parent 0d5c3c5 commit af14274

File tree

5 files changed

+7
-28
lines changed

5 files changed

+7
-28
lines changed

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@
4242
"maglnet/composer-require-checker": "^4.7.1",
4343
"overtrue/phplint": "^9.0",
4444
"phpstan/extension-installer": "^1.3.1",
45-
"phpstan/phpstan": "^1.11.3",
46-
"phpstan/phpstan-deprecation-rules": "^1.2.0",
47-
"phpstan/phpstan-phpunit": "^1.4.0",
48-
"phpstan/phpstan-strict-rules": "^1.6.0",
49-
"phpstan/phpstan-symfony": "^1.4.3",
45+
"phpstan/phpstan": "^2.0",
46+
"phpstan/phpstan-deprecation-rules": "^2.0",
47+
"phpstan/phpstan-phpunit": "^2.0",
48+
"phpstan/phpstan-strict-rules": "^2.0",
49+
"phpstan/phpstan-symfony": "^2.0",
5050
"phpunit/phpunit": "^10.1.3",
5151
"symfony/finder": "^6.4 || ^7.0",
5252
"symfony/process": "^6.4 || ^7.0"

phpstan.neon

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
parameters:
2-
level: max
2+
level: 9
33
phpVersion: 80100
44
treatPhpDocTypesAsCertain: true
55

@@ -11,6 +11,3 @@ parameters:
1111
excludePaths:
1212
analyse:
1313
- tests/Console/Style/SimpleStyle.php
14-
15-
stubFiles:
16-
- stubs/Command.stub

src/Console/Command/SetupCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private function getType(InputInterface $input): string
9292
throw new RuntimeException(sprintf($composerManifestError, 'read')); // @codeCoverageIgnore
9393
}
9494

95-
$composerManifest = \json_decode($composerManifest, true, 512, 0);
95+
$composerManifest = \json_decode($composerManifest, true);
9696
if ($composerManifest === false || !is_array($composerManifest)) {
9797
throw new RuntimeException(sprintf($composerManifestError, 'decoded'));
9898
}

stubs/Command.stub

Lines changed: 0 additions & 16 deletions
This file was deleted.

tests/Unit/CsFixerConfigTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ final class CsFixerConfigTest extends TestCase
2323
{
2424
public function testCreateReturnsCorrectClass(): void
2525
{
26-
/** @var object $csFixerConfig */
2726
$csFixerConfig = CsFixerConfig::create();
28-
self::assertInstanceOf(CsFixerConfig::class, $csFixerConfig);
2927
self::assertTrue($csFixerConfig->getRiskyAllowed());
3028
self::assertCount(52, $csFixerConfig->getRules());
3129
}

0 commit comments

Comments
 (0)