Skip to content
Snippets Groups Projects
Unverified Commit c19f0d71 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 94d0636c
No related branches found
No related tags found
21 merge requests!12227Issue #3181946 by jonmcl, mglaman,!12079Issue #3523476 by matthiasm11: Add empty check on operator,!12024Fix: DocBlock comment for return value of Drupal\Core\Database\Connection::transactionManager(),!11974Draft: Issue #3495165 by catch, joeyroth, berdir, texas-bronius: Better warning...,!11934Issue #3520997: DefaultLazyPluginCollection unnecessarily instantiates plugins when sorting collection,!11887Issue #3520065: The migrate Row class API is incomplete,!11636Draft: Issue #3515643 by macsim: fieldNameExists method is inconsistent,!11515Issue #3480419 by mondrake, smustgrave, catch: Method...,!11380Issue #3490698 by catch, spokje: Bump MINIMUM_STABILITY back to 'stable' when...,!11281Use Drupal Core Leadership terminology in MAINTAINERS.txt,!11239Issue #3507548: Allow workspace changes listing to show all items, without a pager,!11238Fix issue #3051797,!11213Issue #3506743 by tomislav.matokovic: Increasing the color contrast for the navigation block title against the background of the navigation sidebar to at least 4.5:1,!11147Draft: Try to avoid manually setting required cache contexts,!11108Issue #3490298 by nicxvan: Profiles can be missed in OOP hooks,!11093Drupal on MongoDB 11.1.x,!11017Issue #3502540: Add date filter for moderated content.,!11009Issue #3486972 migrate feed icon,!10999Cleaning up Taxonomy hooks and updating baseline.,!10977Issue #3501457: Fix path used in a A11y Test Admin,!10881Issue #3489329 by mfb, casey: symfony/http-foundation commit 32310ff breaks PathValidator
Pipeline #388628 passed
Pipeline: drupal

#388632

    ......@@ -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.
    Please register or to comment