Skip to content

Commit 8b93ef8

Browse files
committed
drupal_root must be defined in the container - parametersSchema requires it
1 parent f78fb38 commit 8b93ef8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

extension.neon

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ parameters:
1212
- profile
1313
- engine
1414
drupal:
15+
drupal_root: null
1516
entityTypeStorageMapping:
1617
node: Drupal\node\NodeStorage
1718
taxonomy_term: Drupal\taxonomy\TermStorage
1819
user: Drupal\user\UserStorage
1920
parametersSchema:
2021
drupal: structure([
21-
drupal_root: string()
22+
drupal_root: schema(string(), nullable())
2223
entityTypeStorageMapping: arrayOf(string())
2324
])
2425
rules:

src/Drupal/DrupalAutoloader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ class DrupalAutoloader
6363
public function register(Container $container): void
6464
{
6565
$startPath = null;
66-
$drupalParams = $container->hasParameter('drupal') ? $container->getParameter('drupal') : [
67-
'drupal_root' => null,
66+
$drupalParams = [
67+
'drupal_root' => $container->getParameter('drupal'),
6868
'serviceMap' => [],
6969
'entityTypeStorageMapping' => [],
7070
];

0 commit comments

Comments
 (0)