diff -u b/core/lib/Drupal/Core/Render/ProtectedRenderArray.php b/core/lib/Drupal/Core/Render/ProtectedRenderArray.php --- b/core/lib/Drupal/Core/Render/ProtectedRenderArray.php +++ b/core/lib/Drupal/Core/Render/ProtectedRenderArray.php @@ -64,11 +64,6 @@ /** * {@inheritdoc} */ - public function offsetUnSet($index) {} - - /** - * {@inheritdoc} - */ public function append($values) {} /** diff -u b/core/lib/Drupal/Core/Render/RenderArrayIterator.php b/core/lib/Drupal/Core/Render/RenderArrayIterator.php --- b/core/lib/Drupal/Core/Render/RenderArrayIterator.php +++ b/core/lib/Drupal/Core/Render/RenderArrayIterator.php @@ -39,11 +39,6 @@ /** * {@inheritdoc} */ - public function offsetUnset($index) {} - - /** - * {@inheritdoc} - */ public function append($values) {} /** diff -u b/core/tests/Drupal/Tests/Core/Render/ProtectedRenderArrayTest.php b/core/tests/Drupal/Tests/Core/Render/ProtectedRenderArrayTest.php --- b/core/tests/Drupal/Tests/Core/Render/ProtectedRenderArrayTest.php +++ b/core/tests/Drupal/Tests/Core/Render/ProtectedRenderArrayTest.php @@ -50,10 +50,6 @@ $protected_array['new_key'] = 'new_value'; $this->assertArrayNotHasKey('new_key', $protected_array); - // Test that existing keys cannot be unset. - unset($protected_array['sub_array']); - $this->assertArrayHasKey('sub_array', $protected_array); - // Test that existing values cannot be changed. $protected_array['sub_markup']['#markup'] = 'Hello world'; $this->assertTrue($protected_array['sub_markup']['#markup'] === 'Test');