Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
In core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php file in function providerPlaceholders() $base_element_a5 is initialized but never used.
Proposed resolution
Remove unused $base_element_a5 variable.
public function providerPlaceholders() {
.........
// Note the absence of '#create_placeholder', presence of max-age=0 created
// by the #lazy_builder callback.
// @todo in https://www.drupal.org/node/2559847
- $base_element_a5 = [];
// Note the absence of '#create_placeholder', presence of high cardinality
// cache context created by the #lazy_builder callback.
// @see \Drupal\Tests\Core\Render\PlaceholdersTest::callbackPerUser()
Comment | File | Size | Author |
---|---|---|---|
unsused-variable-removed.patch | 801 bytes | Hardik_Patel_12 | |
Comments
Comment #3
Hardik_Patel_12 CreditAttribution: Hardik_Patel_12 at QED42 commentedComment #4
apadernoThis is already handled in #2559847: Auto-placeholdering for #lazy_builder with bubbling of max-age where
$base_element_a5
is not an empty array anymore.