Skip to content

Commit 15003d8

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: fix list items use valid XML in code block added Javier as a merger for the WebProfiler bundle use single quotes for YAML strings Typo in When Things Get More Advanced Remove phrase "in order" Remove excessive pluses [Reference] add missing version number replace EOL with EOM remove versionadded for unmaintained versions
2 parents 8e91949 + 21b8d85 commit 15003d8

27 files changed

+56
-71
lines changed

Diff for: best_practices/controllers.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ also show a 404 page if no ``Post`` can be found.
157157
When Things Get More Advanced
158158
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
159159

160-
This works without any configuration because the wildcard name ``{id}`` matches
160+
The above example works without any configuration because the wildcard name ``{id}`` matches
161161
the name of the property on the entity. If this isn't true, or if you have
162162
even more complex logic, the easiest thing to do is just query for the entity
163163
manually. In our application, we have this situation in ``CommentController``:

Diff for: book/forms.rst

-4
Original file line numberDiff line numberDiff line change
@@ -1831,10 +1831,6 @@ section.
18311831
The ``csrf_token_id`` option is optional but greatly enhances the security
18321832
of the generated token by making it different for each form.
18331833

1834-
.. versionadded:: 2.4
1835-
The ``csrf_token_id`` option was introduced in Symfony 2.4. Prior, you
1836-
had to use the ``intention`` option.
1837-
18381834
.. caution::
18391835

18401836
CSRF tokens are meant to be different for every user. This is why you

Diff for: book/service_container.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ parameter and uses it in the service definition.
235235

236236
.. code-block:: xml
237237
238-
<argument type="string">http://symfony.com/?foo=%%s&bar=%%d</argument>
238+
<argument type="string">http://symfony.com/?foo=%%s&amp;bar=%%d</argument>
239239
240240
The purpose of parameters is to feed information into services. Of course
241241
there was nothing wrong with defining the service without using any parameters.

Diff for: book/testing.rst

-3
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,6 @@ document::
288288
// ...or simply check that the response is a redirect to any URL
289289
$this->assertTrue($client->getResponse()->isRedirect());
290290

291-
.. versionadded:: 2.4
292-
Support for HTTP status code constants was introduced in Symfony 2.4.
293-
294291
.. index::
295292
single: Tests; Client
296293

Diff for: components/dependency_injection/configurators.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ The service config for the above classes would look something like this:
145145
newsletter_manager:
146146
class: NewsletterManager
147147
calls:
148-
- [setMailer, ["@my_mailer"]]
148+
- [setMailer, ['@my_mailer']]
149149
configurator: ['@email_configurator', configure]
150150
151151
greeting_card_manager:

Diff for: components/dependency_injection/factories.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ method in the previous example takes the ``templating`` service as an argument:
138138
class: NewsletterManager
139139
factory: ["@newsletter_manager.factory", createNewsletterManager]
140140
arguments:
141-
- "@templating"
141+
- '@templating'
142142
143143
.. code-block:: xml
144144

Diff for: components/dependency_injection/introduction.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ config files:
243243
newsletter_manager:
244244
class: NewsletterManager
245245
calls:
246-
- [setMailer, ["@mailer"]]
246+
- [setMailer, ['@mailer']]
247247
248248
.. code-block:: xml
249249

Diff for: components/dependency_injection/parameters.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ the parameter value in one place if needed.
155155
156156
.. code-block:: xml
157157
158-
<argument>http://symfony.com/?foo=%%s&bar=%%d</argument>
158+
<argument>http://symfony.com/?foo=%%s&amp;bar=%%d</argument>
159159
160160
.. code-block:: php
161161

Diff for: components/dependency_injection/parentservices.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ a parent for a service.
192192
mail_manager:
193193
abstract: true
194194
calls:
195-
- [setMailer, ["@my_mailer"]]
196-
- [setEmailFormatter, ["@my_email_formatter"]]
195+
- [setMailer, ['@my_mailer']]
196+
- [setEmailFormatter, ['@my_email_formatter']]
197197
198198
newsletter_manager:
199199
class: "NewsletterManager"
@@ -320,17 +320,17 @@ to the ``NewsletterManager`` class, the config would look like this:
320320
mail_manager:
321321
abstract: true
322322
calls:
323-
- [setMailer, ["@my_mailer"]]
324-
- [setEmailFormatter, ["@my_email_formatter"]]
323+
- [setMailer, ['@my_mailer']]
324+
- [setEmailFormatter, ['@my_email_formatter']]
325325
326326
newsletter_manager:
327-
class: "NewsletterManager"
327+
class: 'NewsletterManager'
328328
parent: mail_manager
329329
calls:
330-
- [setMailer, ["@my_alternative_mailer"]]
330+
- [setMailer, ['@my_alternative_mailer']]
331331
332332
greeting_card_manager:
333-
class: "GreetingCardManager"
333+
class: 'GreetingCardManager'
334334
parent: mail_manager
335335
336336
.. code-block:: xml

Diff for: components/dependency_injection/types.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ that accepts the dependency::
126126
newsletter_manager:
127127
class: NewsletterManager
128128
calls:
129-
- [setMailer, ["@my_mailer"]]
129+
- [setMailer, ['@my_mailer']]
130130
131131
.. code-block:: xml
132132

Diff for: components/form/form_events.rst

-6
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,6 @@ View data Normalized data transformed using a view transformer
113113

114114
.. sidebar:: ``FormEvents::POST_SET_DATA`` in the Form component
115115

116-
.. versionadded:: 2.4
117-
The data collector extension was introduced in Symfony 2.4.
118-
119116
The ``Symfony\Component\Form\Extension\DataCollector\EventListener\DataCollectorListener``
120117
class is subscribed to listen to the ``FormEvents::POST_SET_DATA`` event
121118
in order to collect information about the forms from the denormalized
@@ -226,9 +223,6 @@ View data Normalized data transformed using a view transformer
226223

227224
.. sidebar:: ``FormEvents::POST_SUBMIT`` in the Form component
228225

229-
.. versionadded:: 2.4
230-
The data collector extension was introduced in Symfony 2.4.
231-
232226
The ``Symfony\Component\Form\Extension\DataCollector\EventListener\DataCollectorListener``
233227
subscribes to the ``FormEvents::POST_SUBMIT`` event in order to collect
234228
information about the forms.

Diff for: components/http_foundation/introduction.rst

-3
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,6 @@ by using the following methods:
248248
:method:`Symfony\\Component\\HttpFoundation\\Request::getEncodings`
249249
Returns the list of accepted encodings ordered by descending quality.
250250

251-
.. versionadded:: 2.4
252-
The ``getEncodings()`` method was introduced in Symfony 2.4.
253-
254251
If you need to get full access to parsed data from ``Accept``, ``Accept-Language``,
255252
``Accept-Charset`` or ``Accept-Encoding``, you can use
256253
:class:`Symfony\\Component\\HttpFoundation\\AcceptHeader` utility class::

Diff for: contributing/code/core_team.rst

+7-2
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,12 @@ Active Core Members
6565
* **Abdellatif AitBoudad** (`aitboudad`_) can merge into the Translation_
6666
component;
6767

68-
* **Jakub Zalas** (`jakzal`_) can merge into the DomCrawler_ component.
68+
* **Jakub Zalas** (`jakzal`_) can merge into the DomCrawler_ component;
6969

70-
* **Christian Flothmann** (`xabbuh`_) can merge into the Yaml_ component.
70+
* **Christian Flothmann** (`xabbuh`_) can merge into the Yaml_ component;
71+
72+
* **Javier Eguiluz** (`javiereguiluz`_) can merge into the WebProfilerBundle_
73+
bundle.
7174

7275
* **Deciders** (``@symfony/deciders`` on GitHub):
7376

@@ -177,6 +180,7 @@ discretion of the **Project Leader**.
177180
.. _Validator: https://github.com/symfony/validator
178181
.. _VarDumper: https://github.com/symfony/var-dumper
179182
.. _Yaml: https://github.com/symfony/yaml
183+
.. _WebProfilerBundle: https://github.com/symfony/web-profiler-bundle
180184
.. _`fabpot`: https://github.com/fabpot/
181185
.. _`webmozart`: https://github.com/webmozart/
182186
.. _`Tobion`: https://github.com/Tobion/
@@ -190,3 +194,4 @@ discretion of the **Project Leader**.
190194
.. _`weaverryan`: https://github.com/weaverryan/
191195
.. _`aitboudad`: https://github.com/aitboudad/
192196
.. _`xabbuh`: https://github.com/xabbuh/
197+
.. _`javiereguiluz`: https://github.com/javiereguiluz/

Diff for: contributing/documentation/format.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ how the behavior has changed:
194194
Whenever a new minor version of Symfony is released (e.g. 2.4, 2.5, etc),
195195
a new branch of the documentation is created from the ``master`` branch.
196196
At this point, all the ``versionadded`` tags for Symfony versions that have
197-
reached end-of-life will be removed. For example, if Symfony 2.5 were released
198-
today, and 2.2 had recently reached its end-of-life, the 2.2 ``versionadded``
197+
reached end-of-maintenance will be removed. For example, if Symfony 2.5 were
198+
released today, and 2.2 had recently reached its end-of-life, the 2.2 ``versionadded``
199199
tags would be removed from the new ``2.5`` branch.
200200

201201
Testing Documentation

Diff for: cookbook/assetic/apply_to_option.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ In this case you can specify that the ``coffee`` filter is applied to all
144144
bin: /usr/bin/coffee
145145
node: /usr/bin/node
146146
node_paths: [/usr/lib/node_modules/]
147-
apply_to: "\.coffee$"
147+
apply_to: '\.coffee$'
148148
149149
.. code-block:: xml
150150

Diff for: cookbook/configuration/override_dir_structure.rst

-2
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,10 @@ The change in the ``composer.json`` will look like this:
177177
.. code-block:: json
178178
179179
{
180-
...
181180
"config": {
182181
"bin-dir": "bin",
183182
"vendor-dir": "/some/dir/vendor"
184183
},
185-
...
186184
}
187185
188186
Then, update the path to the ``autoload.php`` file in ``app/autoload.php``::

Diff for: cookbook/deployment/heroku.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ variables, you can issue a single command to prepare your app for a deployment:
167167
Next up, it's finally time to deploy your application to Heroku. If you are
168168
doing this for the very first time, you may see a message such as the following:
169169

170-
.. code-block:: bash
170+
.. code-block:: text
171171
172172
The authenticity of host 'heroku.com (50.19.85.132)' can't be established.
173173
RSA key fingerprint is 8b:48:5e:67:0e:c9:16:47:32:f2:87:0c:1f:c8:60:ad.

Diff for: cookbook/doctrine/mongodb_session_storage.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Because MongoDB uses dynamic collection schemas, you do not need to do anything
162162
session collection. However, you may want to add an index to improve garbage collection performance.
163163
From the `MongoDB shell`_:
164164

165-
.. code-block:: sql
165+
.. code-block:: text
166166
167167
use session_db
168168
db.session.ensureIndex( { "expires_at": 1 }, { expireAfterSeconds: 0 } )

Diff for: cookbook/form/unit_testing.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ It often happens that you use some options that are added by
165165
:doc:`form extensions </cookbook/form/create_form_type_extension>`. One of the
166166
cases may be the ``ValidatorExtension`` with its ``invalid_message`` option.
167167
The ``TypeTestCase`` only loads the core form extension, which means an
168-
+:class:`Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException`
169-
+will be raised if you try to test a class that depends on other extensions.
170-
+The :method:`Symfony\\Component\\Form\\Test\\TypeTestCase::getExtensions` method
171-
+allows you to return a list of extensions to register::
168+
:class:`Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException`
169+
will be raised if you try to test a class that depends on other extensions.
170+
The :method:`Symfony\\Component\\Form\\Test\\TypeTestCase::getExtensions` method
171+
allows you to return a list of extensions to register::
172172

173173
// src/AppBundle/Tests/Form/Type/TestedTypeTests.php
174174
namespace AppBundle\Tests\Form\Type;

Diff for: cookbook/install/unstable_versions.rst

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ dependency as follows:
4141
4242
{
4343
"require": {
44-
// ...
4544
"symfony/symfony" : "2.7.*@dev"
4645
}
4746
}

Diff for: cookbook/logging/monolog.rst

+13-8
Original file line numberDiff line numberDiff line change
@@ -251,17 +251,22 @@ option of your handler to ``rotating_file``:
251251
.. code-block:: xml
252252
253253
<!-- app/config/config_dev.xml -->
254-
<?xml version="1.0" charset="UTF-8" ?>
255-
<container xmlns=''http://symfony.com/schema/dic/services"
256-
xmlns:monolog="http://symfony.com/schema/dic/monolog">
254+
<?xml version="1.0" encoding="UTF-8" ?>
255+
<container xmlns="http://symfony.com/schema/dic/services"
256+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
257+
xmlns:monolog="http://symfony.com/schema/dic/monolog"
258+
xsi:schemaLocation="http://symfony.com/schema/dic/services
259+
http://symfony.com/schema/dic/services/services-1.0.xsd
260+
http://symfony.com/schema/dic/monolog
261+
http://symfony.com/schema/dic/monolog/monolog-1.0.xsd">
257262
258263
<monolog:config>
264+
<!-- "max_files": max number of log files to keep
265+
defaults to zero, which means infinite files -->
259266
<monolog:handler name="main"
260267
type="rotating_file"
261268
path="%kernel.logs_dir%/%kernel.environment%.log"
262269
level="debug"
263-
<!-- max number of log files to keep
264-
defaults to zero, which means infinite files -->
265270
max_files="10"
266271
/>
267272
</monolog:config>
@@ -346,7 +351,7 @@ using a processor.
346351
347352
monolog.processor.session_request:
348353
class: AppBundle\SessionRequestProcessor
349-
arguments: ["@session"]
354+
arguments: ['@session']
350355
tags:
351356
- { name: monolog.processor, method: processRecord }
352357
@@ -445,7 +450,7 @@ the ``monolog.processor`` tag:
445450
services:
446451
monolog.processor.session_request:
447452
class: AppBundle\SessionRequestProcessor
448-
arguments: ["@session"]
453+
arguments: ['@session']
449454
tags:
450455
- { name: monolog.processor, method: processRecord, handler: main }
451456
@@ -496,7 +501,7 @@ the ``monolog.processor`` tag:
496501
services:
497502
monolog.processor.session_request:
498503
class: AppBundle\SessionRequestProcessor
499-
arguments: ["@session"]
504+
arguments: ['@session']
500505
tags:
501506
- { name: monolog.processor, method: processRecord, channel: main }
502507

Diff for: cookbook/logging/monolog_email.rst

+7-6
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,25 @@ it is broken down.
4141
.. code-block:: xml
4242
4343
<!-- app/config/config_prod.xml -->
44+
<?xml version="1.0" encoding="UTF-8" ?>
4445
<container xmlns="http://symfony.com/schema/dic/services"
4546
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4647
xmlns:monolog="http://symfony.com/schema/dic/monolog"
4748
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
4849
http://symfony.com/schema/dic/monolog http://symfony.com/schema/dic/monolog/monolog-1.0.xsd">
4950
5051
<monolog:config>
52+
<!--
53+
To also log 400 level errors (but not 404's):
54+
action-level="error"
55+
And add this child inside this monolog:handler
56+
<monolog:excluded-404>^/</monolog:excluded-404>
57+
-->
5158
<monolog:handler
5259
name="mail"
5360
type="fingers_crossed"
5461
action-level="critical"
5562
handler="buffered"
56-
<!--
57-
To also log 400 level errors (but not 404's):
58-
action-level="error"
59-
And add this child inside this monolog:handler
60-
<monolog:excluded-404>^/</monolog:excluded-404>
61-
-->
6263
/>
6364
<monolog:handler
6465
name="buffered"

Diff for: cookbook/security/csrf_in_login_form.rst

-8
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ provider available in the Security component:
7272
),
7373
));
7474
75-
.. versionadded:: 2.4
76-
The ``csrf_token_generator`` option was introduced in Symfony 2.4. Prior,
77-
you had to use the ``csrf_provider`` option.
78-
7975
The Security component can be configured further, but this is all information
8076
it needs to be able to use CSRF in the login form.
8177

@@ -186,9 +182,5 @@ After this, you have protected your login form against CSRF attacks.
186182
),
187183
));
188184
189-
.. versionadded:: 2.4
190-
The ``csrf_token_id`` option was introduced in Symfony 2.4. Prior, you
191-
had to use the ``intention`` option.
192-
193185
.. _`Cross-site request forgery`: https://en.wikipedia.org/wiki/Cross-site_request_forgery
194186
.. _`Forging Login Requests`: https://en.wikipedia.org/wiki/Cross-site_request_forgery#Forging_login_requests

Diff for: cookbook/security/entity_provider.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Next, make sure to :ref:`create the database table <book-doctrine-creating-the-d
156156
What's this UserInterface?
157157
~~~~~~~~~~~~~~~~~~~~~~~~~~
158158

159-
So far, this is just a normal entity. But in order to use this class in the
159+
So far, this is just a normal entity. But to use this class in the
160160
security system, it must implement
161161
:class:`Symfony\\Component\\Security\\Core\\User\\UserInterface`. This
162162
forces the class to have the five following methods:

Diff for: cookbook/symfony1.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,10 @@ from specific directories without defining a dependency:
170170

171171
.. code-block:: json
172172
173-
"autoload": {
174-
"psr-0": { "": "src/" }
173+
{
174+
"autoload": {
175+
"psr-0": { "": "src/" }
176+
}
175177
}
176178
177179
This means that if a class is not found in the ``vendor`` directory, Composer

Diff for: cookbook/testing/bootstrap.rst

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ with ``tests.bootstrap.php``:
2828
2929
<!-- ... -->
3030
<phpunit
31-
...
3231
bootstrap = "tests.bootstrap.php"
3332
>
3433

Diff for: reference/configuration/twig.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ TwigBundle Configuration ("twig")
2929
globals:
3030
3131
# Examples:
32-
foo: "@bar"
32+
foo: '@bar'
3333
pi: 3.14
3434
3535
# Example options, but the easiest use is as seen above

0 commit comments

Comments
 (0)