When configuration is renamed the static cache is not properly cleared of all instances of the configuration.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott’s picture

Status: Active » Needs review
FileSize
1.57 KB
2.26 KB

The last submitted patch, 1: 2395511.1-test-only.patch, failed testing.

Wim Leers’s picture

Status: Needs review » Needs work

I could not find any flaws, except for nitpicks. Looks ready to me.

  1. +++ b/core/modules/config/src/Tests/ConfigCRUDTest.php
    @@ -117,13 +117,26 @@ function testCRUD() {
    +    // Pollute the non overrides static cache.
    ...
    +    // Ensure the non overrides static cache has been cleared.
    

    s/non overrides/non-overrides/

  2. +++ b/core/modules/config/src/Tests/ConfigCRUDTest.php
    @@ -117,13 +117,26 @@ function testCRUD() {
    +    $config_factory->setOverrideState(TRUE);
    

    Could use a symmetrical comment, like "Restore overrides".

  3. +++ b/core/modules/config/src/Tests/ConfigCRUDTest.php
    @@ -117,13 +117,26 @@ function testCRUD() {
         $new_name = 'config_test.crud_rename_no_cache';
    

    Could perhaps using a comment above it, to indicate that this is where the *actual* renaming happens, and the testing of that?

alexpott’s picture

Status: Needs work » Needs review
alexpott’s picture

Status: Needs review » Needs work
Gábor Hojtsy’s picture

Priority: Major » Critical
Gábor Hojtsy’s picture

Agreed with Wim, looks good. One more nit:

+++ b/core/modules/config/src/Tests/ConfigCRUDTest.php
@@ -117,13 +117,26 @@ function testCRUD() {
+    // Remove overrides.

Turn off overrides? (We don't actually remove them).

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
1.52 KB
2.33 KB

Patch with those suggestions applied.

Wim Leers’s picture

Status: Needs review » Reviewed & tested by the community

Looks great :)

  • catch committed a9b064c on 8.0.x
    Issue #2395511 by alexpott, Gábor Hojtsy: Config static cache is not...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.0.x, thanks!

Status: Fixed » Closed (fixed)

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