File tree Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,14 @@ parameters:
12
12
- profile
13
13
- engine
14
14
drupal :
15
+ drupal_root : null
15
16
entityTypeStorageMapping :
16
17
node : Drupal\node\NodeStorage
17
18
taxonomy_term : Drupal\taxonomy\TermStorage
18
19
user : Drupal\user\UserStorage
19
20
parametersSchema :
20
21
drupal : structure ([
21
- drupal_root : string ()
22
+ drupal_root : schema ( string (), nullable () )
22
23
entityTypeStorageMapping : arrayOf (string ())
23
24
])
24
25
rules :
Original file line number Diff line number Diff line change @@ -2,6 +2,6 @@ includes:
2
2
- vendor/phpstan/phpstan-strict-rules/rules.neon
3
3
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
4
4
parameters :
5
- level : 7
5
+ level : 8
6
6
checkGenericClassInNonGenericObjectType : false
7
7
checkMissingIterableValueType : false
Original file line number Diff line number Diff line change @@ -63,13 +63,9 @@ class DrupalAutoloader
63
63
public function register (Container $ container ): void
64
64
{
65
65
$ startPath = null ;
66
- $ drupalParams = $ container ->hasParameter ('drupal ' ) ? $ container ->getParameter ('drupal ' ) : [
67
- 'drupal_root ' => null ,
68
- 'serviceMap ' => [],
69
- 'entityTypeStorageMapping ' => [],
70
- ];
71
- $ drupalRoot = $ drupalParams ['drupal_root ' ];
72
- if (realpath ($ drupalRoot ) !== false && is_dir ($ drupalRoot )) {
66
+ $ drupalParams = $ container ->getParameter ('drupal ' );
67
+ $ drupalRoot = $ drupalParams ['drupal_root ' ] ?? null ;
68
+ if ($ drupalRoot !== null && realpath ($ drupalRoot ) !== false && is_dir ($ drupalRoot )) {
73
69
$ startPath = $ drupalRoot ;
74
70
} else {
75
71
$ startPath = dirname ($ GLOBALS ['autoloaderInWorkingDirectory ' ]);
You can’t perform that action at this time.
0 commit comments