Skip to content

Commit 8d61eb6

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: Wrap all strings containing @ in quotes in Yaml Added a note about the use of _format query parameter Always use "main" as the default firewall name (to match Symfony Standard Edition)
2 parents 40a52c8 + 7b4c2b0 commit 8d61eb6

File tree

8 files changed

+32
-24
lines changed

8 files changed

+32
-24
lines changed

book/routing.rst

+14-6
Original file line numberDiff line numberDiff line change
@@ -1104,12 +1104,20 @@ a slash. URLs matching this route might look like:
11041104

11051105
This example also highlights the special ``_format`` routing parameter.
11061106
When using this parameter, the matched value becomes the "request format"
1107-
of the ``Request`` object. Ultimately, the request format is used for such
1108-
things as setting the ``Content-Type`` of the response (e.g. a ``json``
1109-
request format translates into a ``Content-Type`` of ``application/json``).
1110-
It can also be used in the controller to render a different template for
1111-
each value of ``_format``. The ``_format`` parameter is a very powerful way
1112-
to render the same content in different formats.
1107+
of the ``Request`` object.
1108+
1109+
Ultimately, the request format is used for such things as setting the
1110+
``Content-Type`` of the response (e.g. a ``json`` request format translates
1111+
into a ``Content-Type`` of ``application/json``). It can also be used in the
1112+
controller to render a different template for each value of ``_format``.
1113+
The ``_format`` parameter is a very powerful way to render the same content
1114+
in different formats.
1115+
1116+
In Symfony versions previous to 3.0, it is possible to override the request
1117+
format by adding a query parameter named ``_format`` (for example:
1118+
``/foo/bar?_format=json``). Relying on this behavior not only is considered
1119+
a bad practice but it will complicate the upgrade of your applications to
1120+
Symfony 3.
11131121

11141122
.. note::
11151123

cookbook/bundles/best_practices.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ The end user can provide values in any configuration file:
342342
343343
# app/config/config.yml
344344
parameters:
345-
acme_blog.author.email: [email protected]
345+
acme_blog.author.email: "[email protected]"
346346
347347
.. code-block:: xml
348348

cookbook/email/dev_environment.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ via the ``delivery_address`` option:
6666
6767
# app/config/config_dev.yml
6868
swiftmailer:
69-
delivery_address: [email protected]
69+
delivery_address: "[email protected]"
7070
7171
.. code-block:: xml
7272

cookbook/logging/monolog_email.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ it is broken down.
3131
handler: swift
3232
swift:
3333
type: swift_mailer
34-
from_email: [email protected]
35-
34+
from_email: "[email protected]"
35+
to_email: "[email protected]"
3636
# or list of recipients
37-
37+
# to_email: ["[email protected]", "[email protected]", ...]
3838
subject: An Error Occurred!
3939
level: debug
4040
@@ -161,8 +161,8 @@ get logged on the server as well as the emails being sent:
161161
handler: swift
162162
swift:
163163
type: swift_mailer
164-
from_email: [email protected]
165-
164+
from_email: "[email protected]"
165+
to_email: "[email protected]"
166166
subject: An Error Occurred!
167167
level: debug
168168

cookbook/security/entity_provider.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ the username and then check the password (more on passwords in a moment):
216216
# manager_name: customer
217217
218218
firewalls:
219-
default:
219+
main:
220220
pattern: ^/
221221
http_basic: ~
222222
provider: our_db_provider
@@ -244,7 +244,7 @@ the username and then check the password (more on passwords in a moment):
244244
<entity class="AppBundle:User" property="username" />
245245
</provider>
246246
247-
<firewall name="default" pattern="^/" provider="our_db_provider">
247+
<firewall name="main" pattern="^/" provider="our_db_provider">
248248
<http-basic />
249249
</firewall>
250250
@@ -273,7 +273,7 @@ the username and then check the password (more on passwords in a moment):
273273
),
274274
),
275275
'firewalls' => array(
276-
'default' => array(
276+
'main' => array(
277277
'pattern' => '^/',
278278
'http_basic' => null,
279279
'provider' => 'our_db_provider',

cookbook/security/form_login_setup.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ First, enable form login under your firewall:
2323
# ...
2424
2525
firewalls:
26-
default:
26+
main:
2727
anonymous: ~
2828
form_login:
2929
login_path: /login
@@ -40,7 +40,7 @@ First, enable form login under your firewall:
4040
http://symfony.com/schema/dic/services/services-1.0.xsd">
4141
4242
<config>
43-
<firewall name="default">
43+
<firewall name="main">
4444
<anonymous />
4545
<form-login login-path="/login" check-path="/login_check" />
4646
</firewall>
@@ -52,7 +52,7 @@ First, enable form login under your firewall:
5252
// app/config/security.php
5353
$container->loadFromExtension('security', array(
5454
'firewalls' => array(
55-
'default' => array(
55+
'main' => array(
5656
'anonymous' => null,
5757
'form_login' => array(
5858
'login_path' => '/login',

cookbook/security/remember_me.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ the session lasts using a cookie with the ``remember_me`` firewall option:
1919
# ...
2020
2121
firewalls:
22-
default:
22+
main:
2323
# ...
2424
remember_me:
2525
secret: "%secret%"
@@ -43,7 +43,7 @@ the session lasts using a cookie with the ``remember_me`` firewall option:
4343
<config>
4444
<!-- ... -->
4545
46-
<firewall name="default">
46+
<firewall name="main">
4747
<!-- ... -->
4848
4949
<!-- 604800 is 1 week in seconds -->
@@ -65,7 +65,7 @@ the session lasts using a cookie with the ``remember_me`` firewall option:
6565
// ...
6666
6767
'firewalls' => array(
68-
'default' => array(
68+
'main' => array(
6969
// ...
7070
'remember_me' => array(
7171
'secret' => '%secret%',

cookbook/symfony1.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ used them in your application:
331331
# some app.yml file from symfony1
332332
all:
333333
email:
334-
from_address: [email protected]
334+
from_address: "[email protected]"
335335
336336
In Symfony2, you can also create arbitrary entries under the ``parameters``
337337
key of your configuration:
@@ -341,7 +341,7 @@ key of your configuration:
341341
.. code-block:: yaml
342342
343343
parameters:
344-
email.from_address: [email protected]
344+
email.from_address: "[email protected]"
345345
346346
.. code-block:: xml
347347

0 commit comments

Comments
 (0)