Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f0429d7

Browse filesBrowse files
committed
Merge branch '2.8'
* 2.8: Remove horizontal scrollbar Fixed typo. Minor rewording Fixed a minor grammar issue Minor rewording Fixed some typos Improved the explanation about the "secret" configuration parameter
2 parents 701f2cf + 43e7b62 commit f0429d7
Copy full SHA for f0429d7

File tree

Expand file treeCollapse file tree

3 files changed

+34
-9
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+34
-9
lines changed

‎book/installation.rst

Copy file name to clipboardExpand all lines: book/installation.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ several minutes to complete.
305305
.. tip::
306306

307307
Symfony provides a command to check whether your project's dependencies
308-
contain any know security vulnerability:
308+
contain any known security vulnerability:
309309

310310
.. code-block:: bash
311311

‎cookbook/console/commands_as_services.rst

Copy file name to clipboardExpand all lines: cookbook/console/commands_as_services.rst
+15-4Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ with ``console.command``:
3838
<?xml version="1.0" encoding="UTF-8" ?>
3939
<container xmlns="http://symfony.com/schema/dic/services"
4040
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
41-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
41+
xsi:schemaLocation="http://symfony.com/schema/dic/services
42+
http://symfony.com/schema/dic/services/services-1.0.xsd">
4243
4344
<services>
4445
<service id="acme_hello.command.my_command"
4546
class="Acme\HelloBundle\Command\MyCommand">
47+
4648
<tag name="console.command" />
4749
</service>
4850
</services>
@@ -52,7 +54,10 @@ with ``console.command``:
5254
5355
// app/config/config.php
5456
$container
55-
->register('acme_hello.command.my_command', 'Acme\HelloBundle\Command\MyCommand')
57+
->register(
58+
'acme_hello.command.my_command',
59+
'Acme\HelloBundle\Command\MyCommand'
60+
)
5661
->addTag('console.command')
5762
;
5863
@@ -63,7 +68,7 @@ Imagine you want to provide a default value for the ``name`` option. You could
6368
pass one of the following as the 5th argument of ``addOption()``:
6469

6570
* a hardcoded string;
66-
* a container parameter (e.g. something from parameters.yml);
71+
* a container parameter (e.g. something from ``parameters.yml``);
6772
* a value computed by a service (e.g. a repository).
6873

6974
By extending ``ContainerAwareCommand``, only the first is possible, because you
@@ -98,7 +103,13 @@ have some ``NameRepository`` service that you'll use to get your default value::
98103
$this
99104
->setName('demo:greet')
100105
->setDescription('Greet someone')
101-
->addOption('name', '-n', InputOption::VALUE_REQUIRED, 'Who do you want to greet?', $defaultName)
106+
->addOption(
107+
'name',
108+
'-n',
109+
InputOption::VALUE_REQUIRED,
110+
'Who do you want to greet?',
111+
$defaultName
112+
)
102113
;
103114
}
104115

‎reference/configuration/framework.rst

Copy file name to clipboardExpand all lines: reference/configuration/framework.rst
+18-4Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,24 @@ secret
6969

7070
**type**: ``string`` **required**
7171

72-
This is a string that should be unique to your application. In practice,
73-
it's used for generating the CSRF tokens, but it could be used in any other
74-
context where having a unique string is useful. It becomes the service container
75-
parameter named ``kernel.secret``.
72+
This is a string that should be unique to your application and it's commonly used
73+
to add more entropy to security related operations. Its value should be a series of
74+
characters, numbers and symbols chosen randomly and the recommended length is
75+
around 32 characters.
76+
77+
In practice, Symfony uses this value for generating the :ref:`CSRF tokens <forms-csrf>`,
78+
for encrypting the cookies used in the :doc:`remember me functionality </cookbook/security/remember_me>`
79+
and for creating signed URIs when using :ref:`ESI (Edge Side Includes) <edge-side-includes>` .
80+
81+
This option becomes the service container parameter named ``kernel.secret``,
82+
which you can use whenever the application needs an immutable random string
83+
to add more entropy.
84+
85+
As with any other security-related parameter, it is a good practice to change this
86+
value from time to time. However, keep in mind that changing this value will
87+
invalidate all signed URIs and Remember Me cookies. That's why, after changing
88+
this value, you should regenerate the application cache and log out all the
89+
application users.
7690

7791
.. _configuration-framework-http_method_override:
7892

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.