You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (null === $value = $request->headers->get('Surrogate-Capability')) {
69
+
returnfalse;
70
+
}
71
+
72
+
returnfalse !== strpos($value, 'ESI/1.0');
69
73
}
70
74
71
75
/**
@@ -81,11 +85,7 @@ public function hasSurrogateEsiCapability(Request $request)
81
85
{
82
86
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the hasSurrogateCapability() method instead.', E_USER_DEPRECATED);
83
87
84
-
if (null === $value = $request->headers->get('Surrogate-Capability')) {
85
-
returnfalse;
86
-
}
87
-
88
-
returnfalse !== strpos($value, 'ESI/1.0');
88
+
return$this->hasSurrogateCapability($request);
89
89
}
90
90
91
91
/**
@@ -95,7 +95,10 @@ public function hasSurrogateEsiCapability(Request $request)
@@ -109,10 +112,7 @@ public function addSurrogateEsiCapability(Request $request)
109
112
{
110
113
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the addSurrogateCapability() method instead.', E_USER_DEPRECATED);
@@ -154,11 +158,7 @@ public function needsEsiParsing(Response $response)
154
158
{
155
159
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the needsParsing() method instead.', E_USER_DEPRECATED);
156
160
157
-
if (!$control = $response->headers->get('Surrogate-Control')) {
Copy file name to clipboardExpand all lines: HttpCache/EsiResponseCacheStrategyInterface.php
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,8 @@
15
15
16
16
namespaceSymfony\Component\HttpKernel\HttpCache;
17
17
18
+
trigger_error('The '.__NAMESPACE__.'\EsiResponseCacheStrategyInterface class is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\HttpKernel\HttpCache\ResponseCacheStrategyInterface class instead.', E_USER_DEPRECATED);
19
+
18
20
/**
19
21
* ResponseCacheStrategyInterface implementations know how to compute the
20
22
* Response cache HTTP header based on the different response cache headers.
0 commit comments