8000 minor #29295 [Request] [Documentation] clarify that isMethodCacheable… · symfony/symfony@f02874e · GitHub
[go: up one dir, main page]

Skip to content

Commit f02874e

Browse files
committed
minor #29295 [Request] [Documentation] clarify that isMethodCacheable() returns true only for GET & HEAD (tamc)
This PR was merged into the 2.8 branch. Discussion ---------- [Request] [Documentation] clarify that isMethodCacheable() returns true only for GET & HEAD | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | na | License | MIT The current documentation points to https://tools.ietf.org/html/rfc7231#section-4.2.3. The spec says: "this specification defines GET, HEAD, and POST as cacheable, although the overwhelming majority of cache implementations only support GET and HEAD.". This fix to the documentation clarifies that Symfony follows majority (excluding POST) rather than the spec (including POST). Commits ------- 9da9980 Doc fix: clarify isMethodCacheable() returns true only for GET & HEAD
2 parents 145e9aa + 9da9980 commit f02874e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1475,7 +1475,7 @@ public function isMethodSafe(/* $andCacheable = true */)
14751475
*
14761476
* @see https://tools.ietf.org/html/rfc7231#section-4.2.3
14771477
*
1478-
* @return bool
1478+
* @return bool True for GET and HEAD, false otherwise
14791479
*/
14801480
public function isMethodCacheable()
14811481
{

0 commit comments

Comments
 (0)
0