Skip to content
Snippets Groups Projects

Add a test for the recursive dependency between bundle and data type info and "fix" it

3 files
+ 113
0
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -109,6 +109,14 @@ public function getAllBundleInfo() {
}
$this->moduleHandler->alter('entity_bundle_info', $this->bundleInfo);
$this->cacheSet("entity_bundle_info:$langcode", $this->bundleInfo, Cache::PERMANENT, ['entity_types', 'entity_bundles']);
// The loading of entities above may have triggered the setting of the
// data type cache but potentially without all derived entity bundle
// data types. Since the bundle information is now fully built and
// cached, triggering a rebuild of the data type information will yield
// all derived entity bundle data types.
/* @see \Drupal\Core\Entity\Plugin\DataType\Deriver\EntityDeriver */
$this->typedDataManager->clearCachedDefinitions();
}
}
Loading