diff --git a/core/modules/filter/src/Tests/FilterAPITest.php b/core/modules/filter/src/Tests/FilterAPITest.php index 263b31e..47762c1 100644 --- a/core/modules/filter/src/Tests/FilterAPITest.php +++ b/core/modules/filter/src/Tests/FilterAPITest.php @@ -283,6 +283,8 @@ function testProcessedTextElement() { * Tests the function of the typed data type. */ function testTypedDataAPI() { + $this->installSchema('system', ['router']); + $this->container->get('router.builder')->rebuild(); $definition = DataDefinition::create('filter_format'); $data = \Drupal::typedDataManager()->create($definition); diff --git a/core/modules/migrate_drupal/src/Tests/MigrateDrupalTestBase.php b/core/modules/migrate_drupal/src/Tests/MigrateDrupalTestBase.php index 934c350..8bf5ab8 100644 --- a/core/modules/migrate_drupal/src/Tests/MigrateDrupalTestBase.php +++ b/core/modules/migrate_drupal/src/Tests/MigrateDrupalTestBase.php @@ -35,6 +35,8 @@ protected function setUp() { $this->installEntitySchema('user'); $this->installConfig(['migrate_drupal', 'system']); + $this->installSchema('system', ['router']); + $this->container->get('router.builder')->rebuild(); } /** diff --git a/core/modules/user/src/Entity/Role.php b/core/modules/user/src/Entity/Role.php index ed06e88..bc0d30a 100644 --- a/core/modules/user/src/Entity/Role.php +++ b/core/modules/user/src/Entity/Role.php @@ -194,14 +194,17 @@ public function calculateDependencies() { // Load all permissions. $permissions = \Drupal::service('user.permissions')->getPermissions(); foreach ($this->permissions as $permission) { - // Depend on modules that are providing permissions granted to this role. - $this->addDependency('module', $permissions[$permission]['provider']); - // Depend on any other dependencies defined by permissions granted to this - // role. - if (isset($permissions[$permission]['dependencies'])) { - foreach ($permissions[$permission]['dependencies'] as $type => $dependencies) { - foreach ($dependencies as $dependency) { - $this->addDependency($type, $dependency); + // @todo Remove this if() when https://www.drupal.org/node/2569741 is in. + if (isset($permissions[$permission])) { + // Depend on modules that are providing permissions granted to this role. + $this->addDependency('module', $permissions[$permission]['provider']); + // Depend on any other dependencies defined by permissions granted to this + // role. + if (isset($permissions[$permission]['dependencies'])) { + foreach ($permissions[$permission]['dependencies'] as $type => $dependencies) { + foreach ($dependencies as $dependency) { + $this->addDependency($type, $dependency); + } } } }