Skip to content
Snippets Groups Projects
Unverified Commit 0e3d2d66 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3495165 by catch, joeyroth, berdir, texas-bronius: Better warning...

Issue #3495165 by catch, joeyroth, berdir, texas-bronius: Better warning message when variation cache detects an incompatible CacheRedirect

(cherry picked from commit 25b6571b)
parent c2c65f64
No related branches found
No related tags found
1 merge request!11185Issue #3477324 by andypost, alexpott: Fix usage of str_getcsv() and fgetcsv() for PHP 8.4
Pipeline #389409 passed with warnings
Pipeline: drupal

#389435

    Pipeline: drupal

    #389431

      Pipeline: drupal

      #389429

        +7
        ......@@ -136,7 +136,8 @@ public function set(array $keys, $data, CacheableDependencyInterface $cacheabili
        // lead to a value being returned.
        if (!array_diff($common_contexts, $previous_step_contexts)) {
        trigger_error(sprintf(
        'Trying to overwrite a cache redirect with one that has nothing in common, old one at address "%s" was pointing to "%s", new one points to "%s".',
        'Trying to overwrite a cache redirect for "%s" with one that has nothing in common, old one at address "%s" was pointing to "%s", new one points to "%s".',
        $chain_cid,
        implode(', ', $previous_step_contexts),
        implode(', ', array_diff($result_contexts, $previous_step_contexts)),
        implode(', ', array_diff($contexts, $previous_step_contexts)),
        ......
        ......@@ -441,7 +441,7 @@ public function testIncompleteRedirectException(): void {
        // a cache redirect should always be present on the redirect itself. In this
        // example, the final cache redirect should be for 'A,B:foo,B'.
        $this->expectException(\LogicException::class);
        $this->expectExceptionMessage('Trying to overwrite a cache redirect with one that has nothing in common, old one at address "house.type" was pointing to "garden.type:zen", new one points to "garden.type".');
        $this->expectExceptionMessage('Trying to overwrite a cache redirect for "your:housing:situation:ht.house" with one that has nothing in common, old one at address "house.type" was pointing to "garden.type:zen", new one points to "garden.type".');
        $this->housingType = 'house';
        $house_cacheability = (new CacheableMetadata())
        ......@@ -484,7 +484,7 @@ public function testIncompatibleRedirectsException(): void {
        // previous redirects should always be present on the next redirect or item
        // you're trying to store.
        $this->expectException(\LogicException::class);
        $this->expectExceptionMessage('Trying to overwrite a cache redirect with one that has nothing in common, old one at address "house.type" was pointing to "garden.type", new one points to "house.orientation".');
        $this->expectExceptionMessage('Trying to overwrite a cache redirect for "your:housing:situation:ht.house" with one that has nothing in common, old one at address "house.type" was pointing to "garden.type", new one points to "house.orientation".');
        $this->housingType = 'house';
        $house_cacheability = (new CacheableMetadata())
        ......@@ -523,7 +523,7 @@ public function testIncompatibleChainedRedirectsException(): void {
        }, E_USER_WARNING);
        $this->expectException(\LogicException::class);
        $this->expectExceptionMessage('Trying to overwrite a cache redirect with one that has nothing in common, old one at address "house.type, garden.type" was pointing to "house.orientation", new one points to "solar.type".');
        $this->expectExceptionMessage('Trying to overwrite a cache redirect for "your:housing:situation:gt.garden:ht.house" with one that has nothing in common, old one at address "house.type, garden.type" was pointing to "house.orientation", new one points to "solar.type".');
        $this->housingType = 'house';
        $house_cacheability = (new CacheableMetadata())
        ......@@ -572,7 +572,7 @@ public function testIncompatibleChainedRedirectsComplexException(): void {
        }, E_USER_WARNING);
        $this->expectException(\LogicException::class);
        $this->expectExceptionMessage('Trying to overwrite a cache redirect with one that has nothing in common, old one at address "house.type, garden.type" was pointing to "house.orientation", new one points to "solar.type".');
        $this->expectExceptionMessage('Trying to overwrite a cache redirect for "your:housing:situation:gt.garden:ht.house" with one that has nothing in common, old one at address "house.type, garden.type" was pointing to "house.orientation", new one points to "solar.type".');
        $this->housingType = 'house';
        $house_cacheability = (new CacheableMetadata())
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Finish editing this message first!
        Please register or to comment