File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ jobs:
127
127
- name : " require phpstan-drupal"
128
128
run : |
129
129
cd ~/drupal
130
- COMPOSER_MEMORY_LIMIT=-1 composer require mglaman/phpstan-drupal "${{ steps.branch_alias.outputs.VERSION_ALIAS }} as 1.1 .99" phpstan/extension-installer --with-all-dependencies
130
+ COMPOSER_MEMORY_LIMIT=-1 composer require mglaman/phpstan-drupal "${{ steps.branch_alias.outputs.VERSION_ALIAS }} as 1.2 .99" phpstan/extension-installer --with-all-dependencies
131
131
cp $GITHUB_WORKSPACE/tests/fixtures/config/drupal-phpstan.neon phpstan.neon
132
132
- name : " Test core/install.php"
133
133
run : |
Original file line number Diff line number Diff line change @@ -24,12 +24,22 @@ protected function getRule(): Rule
24
24
public function testRule (): void
25
25
{
26
26
$ errors = [];
27
- if (version_compare (\Drupal::VERSION , '10.1 ' , '>= ' )) {
27
+ $ drupalVersion = str_replace ('-dev ' , '' , \Drupal::VERSION );
28
+ if (version_compare ($ drupalVersion , '10.1 ' , '>= ' )) {
29
+ // There's a quirk on 10.1.x+ which false reports this error but was fixed on 11.x.
30
+ if (version_compare ($ drupalVersion , '11.0 ' , '< ' )) {
31
+ $ errors [] = [
32
+ 'Call to deprecated method loadRevision() of class Drupal\Core\Entity\EntityStorageInterface:
33
+ in drupal:10.1.0 and is removed from drupal:11.0.0. Use
34
+ \Drupal\Core\Entity\RevisionableStorageInterface::loadRevision instead. ' ,
35
+ 12
36
+ ];
37
+ }
28
38
$ errors [] = [
29
39
'Call to deprecated method loadRevision() of class Drupal\Core\Entity\EntityStorageInterface:
30
40
in drupal:10.1.0 and is removed from drupal:11.0.0. Use
31
41
\Drupal\Core\Entity\RevisionableStorageInterface::loadRevision instead. ' ,
32
- 12
42
+ 15
33
43
];
34
44
}
35
45
$ this ->analyse (
Original file line number Diff line number Diff line change 10
10
$ genericContentEntityStorage = \Drupal::entityTypeManager ()->getStorage ('foo ' );
11
11
assert ($ genericContentEntityStorage instanceof ContentEntityStorageInterface);
12
12
$ genericContentEntityStorage ->loadRevision (1 );
13
+
14
+ $ genericEntityStorage = \Drupal::entityTypeManager ()->getStorage ('bar ' );
15
+ $ genericEntityStorage ->loadRevision (1 );
You can’t perform that action at this time.
0 commit comments