Skip to content

Commit 30935de

Browse files
authored
PHPStan 1.11.x updates (#765)
* PHPStan 1.11.x updates * add back ignore * keep reportUnmatchedIgnoredErrors for now
1 parent e624a4b commit 30935de

File tree

7 files changed

+10
-11
lines changed

7 files changed

+10
-11
lines changed

.github/workflows/phpstan-dev.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ jobs:
1313
strategy:
1414
matrix:
1515
phpstan:
16-
- '1.10.x-dev'
1716
- '1.11.x-dev'
1817
steps:
1918
- name: "Checkout"

phpstan.neon

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
parameters:
22
level: 8
3-
checkGenericClassInNonGenericObjectType: false
4-
checkMissingIterableValueType: false
53
reportUnmatchedIgnoredErrors: false
4+
ignoreErrors:
5+
-
6+
identifier: missingType.iterableValue
7+
-
8+
identifier: missingType.generics
69
paths:
710
- src
811
- drupal-autoloader.php

src/Internal/NamespaceCheck.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ final class NamespaceCheck
1111
{
1212
public static function isDrupalNamespace(Class_ $class): bool
1313
{
14-
// @phpstan-ignore-next-line
1514
if (!isset($class->namespacedName)) {
1615
return false;
1716
}
@@ -25,7 +24,6 @@ public static function isSharedNamespace(Class_ $class): bool
2524
return false;
2625
}
2726

28-
// @phpstan-ignore-next-line
2927
if (!isset($class->namespacedName)) {
3028
return false;
3129
}

src/Rules/Classes/ClassExtendsInternalClassRule.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ public function processNode(Node $node, Scope $scope): array
4747
return [];
4848
}
4949

50-
// @phpstan-ignore-next-line
5150
if (!isset($node->namespacedName)) {
5251
return [$this->buildError(null, $extendedClassName)->build()];
5352
}

tests/src/Rules/EntityParameterTypehintRuleTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ protected function getRule(): Rule
2020
true,
2121
true,
2222
[]
23-
));
23+
),
24+
true
25+
);
2426
}
2527

2628
public function testRule(): void

tests/src/Rules/GetDeprecatedServiceRuleTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ public function testRuleDrupal8(string $path, array $errorMessages): void
2323
if (version_compare('9.0.0', \Drupal::VERSION) !== 1) {
2424
self::markTestSkipped('Only tested on Drupal 8.x.x');
2525
}
26-
// @phpstan-ignore-next-line
2726
$this->analyse([$path], $errorMessages);
2827
}
2928

@@ -36,7 +35,6 @@ public function testRuleDrupal9(string $path, array $errorMessages): void
3635
if ($version !== '9') {
3736
self::markTestSkipped('Only tested on Drupal 9.x.x');
3837
}
39-
// @phpstan-ignore-next-line
4038
$this->analyse([$path], $errorMessages);
4139
}
4240

tests/src/Rules/RevisionableStorageInterfaceStubTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ public function testRule(): void
2929
// There's a quirk on 10.1.x+ which false reports this error but was fixed on 11.x.
3030
if (version_compare($drupalVersion, '10.2', '<')) {
3131
$errors[] = [
32-
'Call to deprecated method loadRevision() of class Drupal\Core\Entity\EntityStorageInterface:
32+
'Call to deprecated method loadRevision() of interface Drupal\Core\Entity\EntityStorageInterface:
3333
in drupal:10.1.0 and is removed from drupal:11.0.0. Use
3434
\Drupal\Core\Entity\RevisionableStorageInterface::loadRevision instead.',
3535
12
3636
];
3737
}
3838
$errors[] = [
39-
'Call to deprecated method loadRevision() of class Drupal\Core\Entity\EntityStorageInterface:
39+
'Call to deprecated method loadRevision() of interface Drupal\Core\Entity\EntityStorageInterface:
4040
in drupal:10.1.0 and is removed from drupal:11.0.0. Use
4141
\Drupal\Core\Entity\RevisionableStorageInterface::loadRevision instead.',
4242
15

0 commit comments

Comments
 (0)