Skip to content

Commit dcc0536

Browse files
committed
Merge branch '2.3' into 2.6
* 2.3: [#5081] Very minor language tweak [#5008] Shortening section and moving much of the note to reference Added a note about how to enable http_method_override for caching kernels some language tweaks Reworded again the note about "optional options" Reworded the explanation about "optional options" Minow grammar fix Added a note about the Symfony versions affected by ICU problems Reworded the explanation about optional command options
2 parents 3fb19ce + c6db525 commit dcc0536

File tree

5 files changed

+38
-7
lines changed

5 files changed

+38
-7
lines changed

book/http_cache.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,12 @@ kernel::
166166
The caching kernel will immediately act as a reverse proxy - caching responses
167167
from your application and returning them to the client.
168168

169+
.. caution::
170+
171+
If you're using the :ref:`framework.http_method_override <configuration-framework-http_method_override>`
172+
option to read the HTTP method from a ``_method`` parameter, see the
173+
above link for a tweak you need to make.
174+
169175
.. tip::
170176

171177
The cache kernel has a special ``getLog()`` method that returns a string

components/console/introduction.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,11 @@ declare a one-letter shortcut that you can call with a single dash like
324324

325325
.. tip::
326326

327-
It is also possible to make an option *optionally* accept a value (so that
328-
``--yell``, ``--yell=loud`` or ``--yell loud`` work). Options can also be configured to
329-
accept an array of values.
327+
There is nothing forbidding you to create a command with an option that
328+
optionally accepts a value. However, there is no way you can distinguish
329+
when the option was used without a value (``command --yell``) or when it
330+
wasn't used at all (``command``). In both cases, the value retrieved for
331+
the option will be ``null``.
330332

331333
For example, add a new option to the command that can be used to specify
332334
how many times in a row the message should be printed::

components/intl.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ code::
6262

6363
.. sidebar:: ICU and Deployment Problems
6464

65+
.. note::
66+
67+
These deployment problems only affect the following Symfony versions:
68+
2.3.0 to 2.3.20 versions, any 2.4.x version and 2.5.0 to 2.5.5 versions.
69+
6570
The intl extension internally uses the `ICU library`_ to obtain localization
6671
data such as number formats in different languages, country names and more.
6772
To make this data accessible to userland PHP libraries, Symfony ships a copy

cookbook/session/locale_sticky_session.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ before the ``FirewallListener``, which is responsible for handling authenticatio
116116
setting the user token on the ``TokenStorage``, you have no access to the user
117117
which is logged in.
118118

119-
Let's pretend you have defined a ``locale"`` property on your ``User`` entity
120-
and you want to use this as the locale for the given user. To accomplish this,
121-
you can hook into the login process and update the user's session with the
122-
this locale value before they are redirected to their first page.
119+
Suppose you have defined a ``locale`` property on your ``User`` entity and
120+
you want to use this as the locale for the given user. To accomplish this,
121+
you can hook into the login process and update the user's session with this
122+
locale value before they are redirected to their first page.
123123

124124
To do this, you need an event listener for the ``security.interactive_login``
125125
event:

reference/configuration/framework.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,24 @@ method gets called automatically. It becomes the service container parameter
9191
named ``kernel.http_method_override``. For more information, see
9292
:doc:`/cookbook/routing/method_parameters`.
9393

94+
.. caution::
95+
96+
If you're using the :ref:`AppCache Reverse Proxy <symfony2-reverse-proxy>`
97+
with this option, the kernel will ignore the ``_method`` parameter,
98+
which could lead to errors.
99+
100+
To fix this, invoke the ``enableHttpMethodParameterOverride()`` method
101+
before creating the ``Request`` object::
102+
103+
// web/app.php
104+
105+
// ...
106+
$kernel = new AppCache($kernel);
107+
108+
Request::enableHttpMethodParameterOverride(); // <-- add this line
109+
$request = Request::createFromGlobals();
110+
// ...
111+
94112
ide
95113
~~~
96114

0 commit comments

Comments
 (0)