Problem/Motivation

  /**
   * Static cache of entities, keyed first by entity ID, then by an extra key.
   *
   * The additional cache key is to maintain separate caches for different
   * states of config overrides.
   *
   * @var array
   * @see \Drupal\Core\Config\ConfigFactoryInterface::getCacheKeys().
   */
  protected $entities = [];

I can't see any access of $this->entities anywhere.

I suspect this is a leftover from before the memory cache service was added.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joachim created an issue. See original summary.

bogdan.rizescu’s picture

Status: Active » Needs review
FileSize
864 bytes

I have created a patch for this issue. I deleted the unused $entities property from the class alongside its description. Also, I was unsuccessful trying to find ConfigFactoryInterface::getCacheKeys() method in Drupal Core, it seems outdated and $entities property is not used anywhere in the ConfigEntityStorage class.

joachim’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for looking at this and for the patch.

Patch looks good, and tests pass. RTBC!

  • catch committed 9b3c155 on 9.2.x
    Issue #3201957 by bogdan.rizescu, joachim: Unused $entities property in...
catch’s picture

Status: Reviewed & tested by the community » Fixed

I think this is fine to remove as dead code since it's assumed to be empty anyway, and it's not the sort of thing an override of ConfigEntityStorage would deal with. The only other option would be deprecating it for removal in Drupal 10, but there's not really a way to provide bc here - any code using this would be looking in the wrong place for cached config entities. So just removal seems right. Also this isn't a base class so we're entitled to make changes to protected property.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.