Skip to content

Commit 701f2cf

Browse files
committed
Merge branch '2.8'
2 parents b74593c + 1cb2363 commit 701f2cf

20 files changed

+390
-363
lines changed

best_practices/configuration.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ everywhere in your application. When using parameters, they are only available
126126
from places with access to the Symfony container.
127127

128128
Constants can be used for example in your Twig templates thanks to the
129-
``constant()`` function:
129+
`constant() function`_:
130130

131131
.. code-block:: html+jinja
132132

best_practices/i18n.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ English in the application would be:
8080

8181
.. code-block:: xml
8282
83-
<!-- app/Resources/translations/messages.en.xliff -->
83+
<!-- app/Resources/translations/messages.en.xlf -->
8484
<?xml version="1.0"?>
8585
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
8686
<file source-language="en" target-language="en" datatype="plaintext" original="file.ext">

book/translation.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ different formats, XLIFF being the recommended format:
127127

128128
.. code-block:: xml
129129
130-
<!-- messages.fr.xliff -->
130+
<!-- messages.fr.xlf -->
131131
<?xml version="1.0"?>
132132
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
133133
<file source-language="en" datatype="plaintext" original="file.ext">
@@ -356,18 +356,18 @@ must be named according to the following path: ``domain.locale.loader``:
356356

357357
* **locale**: The locale that the translations are for (e.g. ``en_GB``, ``en``, etc);
358358

359-
* **loader**: How Symfony should load and parse the file (e.g. ``xliff``,
359+
* **loader**: How Symfony should load and parse the file (e.g. ``xlf``,
360360
``php``, ``yml``, etc).
361361

362362
The loader can be the name of any registered loader. By default, Symfony
363363
provides many loaders, including:
364364

365-
* ``xliff``: XLIFF file;
365+
* ``xlf``: XLIFF file;
366366
* ``php``: PHP file;
367367
* ``yml``: YAML file.
368368

369369
The choice of which loader to use is entirely up to you and is a matter of
370-
taste. The recommended option is to use ``xliff`` for translations.
370+
taste. The recommended option is to use ``xlf`` for translations.
371371
For more options, see :ref:`component-translator-message-catalogs`.
372372

373373
.. note::
@@ -397,10 +397,10 @@ key ``Symfony is great``. To find the French translation, Symfony actually
397397
checks translation resources for several locales:
398398

399399
#. First, Symfony looks for the translation in a ``fr_FR`` translation resource
400-
(e.g. ``messages.fr_FR.xliff``);
400+
(e.g. ``messages.fr_FR.xlf``);
401401

402402
#. If it wasn't found, Symfony looks for the translation in a ``fr`` translation
403-
resource (e.g. ``messages.fr.xliff``);
403+
resource (e.g. ``messages.fr.xlf``);
404404

405405
#. If the translation still isn't found, Symfony uses the ``fallbacks`` configuration
406406
parameter, which defaults to ``en`` (see `Configuration`_).
@@ -662,7 +662,7 @@ bundle.
662662

663663
.. code-block:: xml
664664
665-
<!-- validators.en.xliff -->
665+
<!-- validators.en.xlf -->
666666
<?xml version="1.0"?>
667667
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
668668
<file source-language="en" datatype="plaintext" original="file.ext">

components/security/introduction.rst

+1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ Sections
2525
* :doc:`/components/security/firewall`
2626
* :doc:`/components/security/authentication`
2727
* :doc:`/components/security/authorization`
28+
* :doc:`/components/security/secure_tools`
2829

2930
.. _Packagist: https://packagist.org/packages/symfony/security

components/translation/introduction.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,13 @@ organization, translations were split into three different domains:
186186
loaded like this::
187187

188188
// ...
189-
$translator->addLoader('xliff', new XliffFileLoader());
189+
$translator->addLoader('xlf', new XliffFileLoader());
190190

191-
$translator->addResource('xliff', 'messages.fr.xliff', 'fr_FR');
192-
$translator->addResource('xliff', 'admin.fr.xliff', 'fr_FR', 'admin');
191+
$translator->addResource('xlf', 'messages.fr.xlf', 'fr_FR');
192+
$translator->addResource('xlf', 'admin.fr.xlf', 'fr_FR', 'admin');
193193
$translator->addResource(
194-
'xliff',
195-
'navigation.fr.xliff',
194+
'xlf',
195+
'navigation.fr.xlf',
196196
'fr_FR',
197197
'navigation'
198198
);

cookbook/composer.rst

+8-4
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
Installing Composer
55
===================
66

7-
`Composer`_ is the package manager used by modern PHP applications and the
8-
recommended way to install Symfony2.
7+
`Composer`_ is the package manager used by modern PHP applications. Use Composer
8+
to manage dependencies in your Symfony applications and to install Symfony Components
9+
in your PHP projects.
10+
11+
It's recommended to install Composer globally in your system as explained in the
12+
following sections.
913

1014
Install Composer on Linux and Mac OS X
1115
--------------------------------------
@@ -37,8 +41,8 @@ the instructions.
3741
Learn more
3842
----------
3943

40-
You can read more about Composer in `its documentation`_.
44+
Read the `Composer documentation`_ to learn more about its usage and features.
4145

4246
.. _`Composer`: https://getcomposer.org/
4347
.. _`getcomposer.org/download`: https://getcomposer.org/download
44-
.. _`its documentation`: https://getcomposer.org/doc/00-intro.md
48+
.. _`Composer documentation`: https://getcomposer.org/doc/00-intro.md

cookbook/configuration/configuration_organization.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class::
2323

2424
public function registerContainerConfiguration(LoaderInterface $loader)
2525
{
26-
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
26+
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
2727
}
2828
}
2929

@@ -101,7 +101,7 @@ method::
101101

102102
public function registerContainerConfiguration(LoaderInterface $loader)
103103
{
104-
$loader->load(__DIR__.'/config/'.$this->getEnvironment().'/config.yml');
104+
$loader->load($this->getRootDir().'/config/'.$this->getEnvironment().'/config.yml');
105105
}
106106
}
107107

@@ -199,7 +199,7 @@ make Symfony aware of the new file organization::
199199

200200
public function registerContainerConfiguration(LoaderInterface $loader)
201201
{
202-
$loader->load(__DIR__.'/config/environments/'.$this->getEnvironment().'.yml');
202+
$loader->load($this->getRootDir().'/config/environments/'.$this->getEnvironment().'.yml');
203203
}
204204
}
205205

cookbook/configuration/environments.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class:
4545
4646
public function registerContainerConfiguration(LoaderInterface $loader)
4747
{
48-
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
48+
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
4949
}
5050
}
5151

cookbook/configuration/web_server_configuration.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ The **minimum configuration** to get your application running under Apache is:
5252
# uncomment the following lines if you install assets as symlinks
5353
# or run into problems when compiling LESS/Sass/CoffeScript assets
5454
# <Directory /var/www/project>
55-
# Option FollowSymlinks
55+
# Options FollowSymlinks
5656
# </Directory>
5757
5858
ErrorLog /var/log/apache2/project_error.log
@@ -90,7 +90,7 @@ and increase web server performance:
9090
# uncomment the following lines if you install assets as symlinks
9191
# or run into problems when compiling LESS/Sass/CoffeScript assets
9292
# <Directory /var/www/project>
93-
# Option FollowSymlinks
93+
# Options FollowSymlinks
9494
# </Directory>
9595
9696
ErrorLog /var/log/apache2/project_error.log
@@ -194,7 +194,7 @@ directive to pass requests for PHP files to PHP FPM:
194194
# uncomment the following lines if you install assets as symlinks
195195
# or run into problems when compiling LESS/Sass/CoffeScript assets
196196
# <Directory /var/www/project>
197-
# Option FollowSymlinks
197+
# Options FollowSymlinks
198198
# </Directory>
199199
200200
ErrorLog /var/log/apache2/project_error.log
@@ -230,7 +230,7 @@ should look something like this:
230230
# uncomment the following lines if you install assets as symlinks
231231
# or run into problems when compiling LESS/Sass/CoffeScript assets
232232
# <Directory /var/www/project>
233-
# Option FollowSymlinks
233+
# Options FollowSymlinks
234234
# </Directory>
235235
236236
ErrorLog /var/log/apache2/project_error.log

cookbook/routing/slash_in_parameter.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ a more permissive regex path.
3131
class DemoController
3232
{
3333
/**
34-
* @Route("/hello/{name}", name="_hello", requirements={"name"=".+"})
34+
* @Route("/hello/{username}", name="_hello", requirements={"username"=".+"})
3535
*/
36-
public function helloAction($name)
36+
public function helloAction($username)
3737
{
3838
// ...
3939
}

cookbook/security/csrf_in_login_form.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Configuring CSRF Protection
1818

1919
First, configure the Security component so it can use CSRF protection.
2020
The Security component needs a CSRF token provider. You can set this to use the default
21-
provider available in the Form component:
21+
provider available in the Security component:
2222

2323
.. configuration-block::
2424

@@ -31,7 +31,7 @@ provider available in the Form component:
3131
# ...
3232
form_login:
3333
# ...
34-
csrf_provider: form.csrf_provider
34+
csrf_provider: security.csrf.token_manager
3535
3636
.. code-block:: xml
3737
@@ -46,7 +46,7 @@ provider available in the Form component:
4646
<firewall name="secured_area">
4747
<!-- ... -->
4848
49-
<form-login csrf-provider="form.csrf_provider" />
49+
<form-login csrf-provider="security.csrf.token_manager" />
5050
</firewall>
5151
</config>
5252
</srv:container>
@@ -60,7 +60,7 @@ provider available in the Form component:
6060
// ...
6161
'form_login' => array(
6262
// ...
63-
'csrf_provider' => 'form.csrf_provider',
63+
'csrf_provider' => 'security.csrf.token_manager',
6464
)
6565
)
6666
)

cookbook/security/entity_provider.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,11 @@ and password ``admin`` (which has been encoded).
297297
.. code-block:: bash
298298
299299
$ mysql> SELECT * FROM app_users;
300-
+----+----------+------------------------------------------+--------------------+-----------+
301-
| id | username | password | email | is_active |
302-
+----+----------+------------------------------------------+--------------------+-----------+
303-
| 1 | admin | d033e22ae348aeb5660fc2140aec35850c4da997 | admin@example.com | 1 |
304-
+----+----------+------------------------------------------+--------------------+-----------+
300+
+----+----------+--------------------------------------------------------------+--------------------+-----------+
301+
| id | username | password | email | is_active |
302+
+----+----------+--------------------------------------------------------------+--------------------+-----------+
303+
| 1 | admin | $2a$08$jHZj/wJfcVKlIwr5AvR78euJxYK7Ku5kURNhNx.7.CSIJ3Pq6LEPC | admin@example.com | 1 |
304+
+----+----------+--------------------------------------------------------------+--------------------+-----------+
305305
306306
.. sidebar:: Do you need to a Salt property?
307307

cookbook/serializer.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Here is an example on how to load the
7777
# app/config/services.yml
7878
services:
7979
get_set_method_normalizer:
80-
class: Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer
80+
class: Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer
8181
tags:
8282
- { name: serializer.normalizer }
8383

cookbook/service_container/event_listener.rst

+2-3
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,8 @@ using a special "tag":
9696
.. note::
9797

9898
There is an additional tag option ``priority`` that is optional and defaults
99-
to 0. This value can be from -255 to 255, and the listeners will be executed
100-
in the order of their priority (highest to lowest). This is useful when
101-
you need to guarantee that one listener is executed before another.
99+
to 0. The listeners will be executed in the order of their priority (highest to lowest).
100+
This is useful when you need to guarantee that one listener is executed before another.
102101

103102
Request Events, Checking Types
104103
------------------------------

0 commit comments

Comments
 (0)