diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php index 12737d8..77cf702 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php @@ -106,10 +106,9 @@ class ConfigEntityStorage extends EntityStorageBase implements ConfigEntityStora * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager * The language manager. * @param \Drupal\Core\Cache\StaticCache\StaticCacheInterface $static_cache - * The static cache backend. + * (optional) The cache backend to be used. */ public function __construct(EntityTypeInterface $entity_type, ConfigFactoryInterface $config_factory, UuidInterface $uuid_service, LanguageManagerInterface $language_manager, StaticCacheInterface $static_cache = NULL) { - $static_cache = isset($static_cache) ? $static_cache : \Drupal::service('static_cache'); parent::__construct($entity_type, $static_cache); $this->configFactory = $config_factory; diff --git a/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php index 753d745..f7160a6 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php @@ -44,11 +44,10 @@ * The entity manager. * @param \Drupal\Core\Cache\CacheBackendInterface $cache * The cache backend to be used. - * @param \Drupal\Core\Cache\CacheBackendInterface $static_cache - * The cache backend to be used. + * @param \Drupal\Core\Cache\StaticCache\StaticCacheInterface $static_cache + * (optional) The cache backend to be used. */ public function __construct(EntityTypeInterface $entity_type, EntityManagerInterface $entity_manager, CacheBackendInterface $cache, StaticCacheInterface $static_cache = NULL) { - $static_cache = isset($static_cache) ? $static_cache : \Drupal::service('static_cache'); parent::__construct($entity_type, $static_cache); $this->bundleKey = $this->entityType->getKey('bundle'); $this->entityManager = $entity_manager; diff --git a/core/lib/Drupal/Core/Entity/EntityStorageBase.php b/core/lib/Drupal/Core/Entity/EntityStorageBase.php index 5251745..73b80e2 100644 --- a/core/lib/Drupal/Core/Entity/EntityStorageBase.php +++ b/core/lib/Drupal/Core/Entity/EntityStorageBase.php @@ -76,7 +76,7 @@ /** * The static cache. * - * @var \Drupal\Core\StaticCache\StaticCacheInterface + * @var \Drupal\Core\Cache\StaticCache\StaticCacheInterface */ protected $staticCache; diff --git a/core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php b/core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php index 395414d..2dbefb0 100644 --- a/core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php +++ b/core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php @@ -51,13 +51,6 @@ class KeyValueEntityStorage extends EntityStorageBase { protected $languageManager; /** - * The static cache. - * - * @var \Drupal\Core\StaticCache\StaticCacheInterface - */ - protected $staticCache; - - /** * Constructs a new KeyValueEntityStorage. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type @@ -68,11 +61,10 @@ class KeyValueEntityStorage extends EntityStorageBase { * The UUID service. * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager * The language manager. - * @param \Drupal\Core\StaticCache\StaticCacheInterface $static_cache - * The static cache. + * @param \Drupal\Core\Cache\StaticCache\StaticCacheInterface $static_cache + * (optional) The cache backend to be used. */ public function __construct(EntityTypeInterface $entity_type, KeyValueStoreInterface $key_value_store, UuidInterface $uuid_service, LanguageManagerInterface $language_manager, StaticCacheInterface $static_cache = NULL) { - $static_cache = isset($static_cache) ? $static_cache : \Drupal::service('static_cache'); parent::__construct($entity_type, $static_cache); $this->keyValueStore = $key_value_store; $this->uuidService = $uuid_service;