File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,24 @@ kernel::
163163The caching kernel will immediately act as a reverse proxy - caching responses
164164from your application and returning them to the client.
165165
166+ .. caution ::
167+
168+ By default, a kernel based on the cache ignores the ``framework.http_method_override ``
169+ option, which could lead to errors when using ``PUT ``, ``DELETE `` and ``PURGE ``
170+ methods in HTTP requests.
171+
172+ Invoke the ``enableHttpMethodParameterOverride() `` method before creating the
173+ ``Request `` object in order to take this option into account::
174+
175+ // web/app.php
176+
177+ // ...
178+ $kernel = new AppCache($kernel);
179+
180+ Request::enableHttpMethodParameterOverride(); // <-- add this line
181+ $request = Request::createFromGlobals();
182+ // ...
183+
166184.. tip ::
167185
168186 The cache kernel has a special ``getLog() `` method that returns a string
You can’t perform that action at this time.
0 commit comments