Problem/Motivation
Cache tags for placeholders are bubbled by HtmlResponseSubscriber::onRespond(), this event subscriber has the same priority as CacheableResponseSubscriber::onRespond() (0).
This causes several problems:
- The order between subscribers with the same priority is not guaranteed (see #2344645: The order of event subscribers should not be affected by definition order)
- Modules like cache_tags_simplify can not easily alter the cache tags between
HtmlResponseSubscriberandCacheableResponseSubscriber
Steps to reproduce
Try to create an event subscriber that alters the placeholder cache tags before the Cache-Tags header is generated.
Proposed resolution
CacheableResponseSubscriber should use a lower priority.
Issue fork purge-3274608
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
prudloff commentedComment #4
prudloff commentedThe failing phpunit tests seem to be unrelated: #3575520: Invalid data provider in phpunit test