Change record status: 
Project: 
Introduced in branch: 
10.4.x, 11.x
Introduced in version: 
10.4.0, 11.1.0
Description: 

The weight of Drupal\dynamic_page_cache\EventSubscriber\DynamicPageCacheSubscriber has been changed from 100 to 7. This change affects the order in which this subscriber executes in relation to other event subscribers during the response event.

    // Run before:
    // * HtmlResponseSubscriber::onRespond(), which has priority 0.
    // * AnonymousUserResponseSubscriber::onRespond(). which has priority 5,
    // and it bubbles up cacheability information for anonymous users.
    // Run after:
    // * RouteAccessResponseSubscriber::onRespond() which has priority 10, and
    // it adds cacheability information from the access result returned by
    // the route access checker.
    $events[KernelEvents::RESPONSE][] = ['onResponse', 7];

This weight change was required to fix a bug where the Dynamic Page Cache would ignore cacheability information that bubbled up from route access checkers. By adjusting the execution order of the DynamicPageCacheSubscriber, the cacheability information from the route access checker is now correctly taken into account.

For more information, see the related change record: Dynamic Page Cache no longer ignores cacheability information from route access checkers.

Impacts: 
Module developers