core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php | 8 -------- core/lib/Drupal/Core/Render/BubbleableMetadata.php | 1 - core/modules/aggregator/src/Tests/ItemCacheTagsTest.php | 10 ---------- core/modules/comment/src/Tests/CommentCacheTagsTest.php | 2 ++ 4 files changed, 2 insertions(+), 19 deletions(-) diff --git a/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php b/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php index ff46e3e..df9113c 100644 --- a/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php +++ b/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php @@ -35,13 +35,6 @@ class EntityFormDisplay extends EntityDisplayBase implements EntityFormDisplayIn protected $displayContext = 'form'; /** - * The renderer. - * - * @var \Drupal\Core\Render\RendererInterface - */ - protected $renderer; - - /** * Returns the entity_form_display object used to build an entity form. * * Depending on the configuration of the form mode for the entity bundle, this @@ -123,7 +116,6 @@ public static function collectRenderDisplay(FieldableEntityInterface $entity, $f */ public function __construct(array $values, $entity_type) { $this->pluginManager = \Drupal::service('plugin.manager.field.widget'); - $this->renderer = \Drupal::service('renderer'); parent::__construct($values, $entity_type); } diff --git a/core/lib/Drupal/Core/Render/BubbleableMetadata.php b/core/lib/Drupal/Core/Render/BubbleableMetadata.php index 1bbd8ab..31a1f85 100644 --- a/core/lib/Drupal/Core/Render/BubbleableMetadata.php +++ b/core/lib/Drupal/Core/Render/BubbleableMetadata.php @@ -8,7 +8,6 @@ namespace Drupal\Core\Render; use Drupal\Component\Utility\NestedArray; -use Drupal\Core\Access\AccessResultInterface; use Drupal\Core\Cache\Cache; use Drupal\Core\Cache\CacheableDependencyInterface; diff --git a/core/modules/aggregator/src/Tests/ItemCacheTagsTest.php b/core/modules/aggregator/src/Tests/ItemCacheTagsTest.php index fd6fdee..925a6ed 100644 --- a/core/modules/aggregator/src/Tests/ItemCacheTagsTest.php +++ b/core/modules/aggregator/src/Tests/ItemCacheTagsTest.php @@ -9,7 +9,6 @@ use Drupal\aggregator\Entity\Feed; use Drupal\aggregator\Entity\Item; -use Drupal\Core\Entity\EntityInterface; use Drupal\system\Tests\Entity\EntityCacheTagsTestBase; use Drupal\user\Entity\Role; use Drupal\user\RoleInterface; @@ -85,13 +84,4 @@ public function testEntityCreation() { $this->assertFalse(\Drupal::cache('render')->get('foo'), 'Creating a new feed item invalidates the cache tag of the feed.'); } - /** - * {@inheritdoc} - */ - protected function getAdditionalCacheContextsForEntity(EntityInterface $entity) { - return [ - 'user.permissions', - ]; - } - } diff --git a/core/modules/comment/src/Tests/CommentCacheTagsTest.php b/core/modules/comment/src/Tests/CommentCacheTagsTest.php index d4710f5..04e0848 100644 --- a/core/modules/comment/src/Tests/CommentCacheTagsTest.php +++ b/core/modules/comment/src/Tests/CommentCacheTagsTest.php @@ -87,6 +87,8 @@ protected function createEntity() { */ protected function getAdditionalCacheContextsForEntity(EntityInterface $entity) { return [ + // Field access for the user picture rendered as part of the node that + // this comment is created on. 'user.permissions', ]; }