This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component
Fabien Potencier 551e5ba515 bug #23129 Fix two edge cases in ResponseCacheStrategy (mpdude)
This PR was squashed before being merged into the 2.7 branch (closes #23129).

Discussion
----------

Fix two edge cases in ResponseCacheStrategy

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

While reviewing how `ResponseCacheStrategy` calculates the caching-related headers for responses that embed subrequests, I came across two cases that I think are currently implemented incorrectly.

a) When the main response is public and cacheable with an expiration time, but it embeds (via ESI) a controller that does not set any caching-related headers, this embedded response is more constrained. So, the resulting (combined) response must not be cacheable, especially it may not keep the s-maxage.

b) When the main response is public and cacheable with an expiration time, but it embeds (via ESI) a controller that explicitly creates a "private" response, the resulting (combined) response must be private as well.

Commits
-------

c6e8c07e4d Fix two edge cases in ResponseCacheStrategy
2017-06-14 14:29:16 -07:00
..
Asset [Asset] Starting slash should indicate no basePath wanted 2017-04-28 16:08:24 -07:00
BrowserKit fail when detecting risky tests 2017-04-12 09:39:27 +02:00
ClassLoader Using FQ name for PHP_VERSION_ID 2017-06-01 13:44:56 -07:00
Config fail when detecting risky tests 2017-04-12 09:39:27 +02:00
Console minor #22986 CS: adjust chaining indentation (keradus) 2017-06-02 16:34:38 +02:00
CssSelector Fix minor phpdoc mismatches with the code(detected by phan) 2017-04-29 08:58:46 -07:00
Debug Using FQ name for PHP_VERSION_ID 2017-06-01 13:44:56 -07:00
DependencyInjection minor #22931 SCA with Php Inspections (EA Extended): 2.7 (kalessil) 2017-06-10 17:25:34 -07:00
DomCrawler Fix file perms 2017-05-22 13:36:46 +02:00
EventDispatcher [EventDispatcher] Fix ContainerAwareEventDispatcher::hasListeners(null) 2017-06-01 23:49:12 +02:00
ExpressionLanguage Using FQ name for PHP_VERSION_ID 2017-06-01 13:44:56 -07:00
Filesystem bug #23092 [Filesystem] added workaround in Filesystem::rename for PHP bug (VolCh) 2017-06-14 12:55:44 -07:00
Finder Using FQ name for PHP_VERSION_ID 2017-06-01 13:44:56 -07:00
Form fixed CS 2017-06-13 17:54:13 -07:00
HttpFoundation [HttpFoundation] added missing docs 2017-06-14 12:35:44 -07:00
HttpKernel Fix two edge cases in ResponseCacheStrategy 2017-06-14 14:29:14 -07:00
Intl Using FQ name for PHP_VERSION_ID 2017-06-01 13:44:56 -07:00
Locale fail when detecting risky tests 2017-04-12 09:39:27 +02:00
OptionsResolver fail when detecting risky tests 2017-04-12 09:39:27 +02:00
Process fail when detecting risky tests 2017-04-12 09:39:27 +02:00
PropertyAccess Using FQ name for PHP_VERSION_ID 2017-06-01 13:44:56 -07:00
Routing bug #22636 [Routing] Expose request in route conditions, if needed and possible (ro0NL) 2017-06-14 13:57:27 -07:00
Security minor #22931 SCA with Php Inspections (EA Extended): 2.7 (kalessil) 2017-06-10 17:25:34 -07:00
Serializer Using FQ name for PHP_VERSION_ID 2017-06-01 13:44:56 -07:00
Stopwatch fail when detecting risky tests 2017-04-12 09:39:27 +02:00
Templating Using FQ name for PHP_VERSION_ID 2017-06-01 13:44:56 -07:00
Translation Using FQ name for PHP_VERSION_ID 2017-06-01 13:44:56 -07:00
Validator minor #22986 CS: adjust chaining indentation (keradus) 2017-06-02 16:34:38 +02:00
VarDumper [VarDumper] fixes 2017-06-14 18:20:11 +02:00
Yaml Using FQ name for PHP_VERSION_ID 2017-06-01 13:44:56 -07:00