core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php | 3 +-- core/modules/block/src/Tests/BlockViewBuilderTest.php | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php b/core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php index 251507f..650cf78 100644 --- a/core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php +++ b/core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php @@ -138,8 +138,7 @@ public function build() { // The main content block cannot be cached: it is a placeholder for the // render array returned by the controller. It should be rendered as-is, - // with other placed blocks "decorating" it. Furthermore, it should - // never be turned into a placeholder, because doing so would result + // with other placed blocks "decorating" it. if ($block_plugin instanceof MainContentBlockPluginInterface) { unset($build[$region][$key]['#cache']['keys']); } diff --git a/core/modules/block/src/Tests/BlockViewBuilderTest.php b/core/modules/block/src/Tests/BlockViewBuilderTest.php index e4a64ff..51e87ad 100644 --- a/core/modules/block/src/Tests/BlockViewBuilderTest.php +++ b/core/modules/block/src/Tests/BlockViewBuilderTest.php @@ -193,15 +193,15 @@ protected function verifyRenderCacheHandling() { public function testBlockViewBuilderViewAlter() { // Establish baseline. $build = $this->getBlockRenderArray(); - $this->setRawContent((string)$this->renderer->renderRoot($build)); - $this->assertIdentical(trim((string)$this->cssSelect('div')[0]), 'Llamas > unicorns!'); + $this->setRawContent((string) $this->renderer->renderRoot($build)); + $this->assertIdentical(trim((string) $this->cssSelect('div')[0]), 'Llamas > unicorns!'); // Enable the block view alter hook that adds a foo=bar attribute. \Drupal::state()->set('block_test_view_alter_suffix', TRUE); Cache::invalidateTags($this->block->getCacheTagsToInvalidate()); $build = $this->getBlockRenderArray(); - $this->setRawContent((string)$this->renderer->renderRoot($build)); - $this->assertIdentical(trim((string)$this->cssSelect('[foo=bar]')[0]), 'Llamas > unicorns!'); + $this->setRawContent((string) $this->renderer->renderRoot($build)); + $this->assertIdentical(trim((string) $this->cssSelect('[foo=bar]')[0]), 'Llamas > unicorns!'); \Drupal::state()->set('block_test_view_alter_suffix', FALSE); \Drupal::state()->set('block_test.content', NULL);