Skip to content

Commit 0b48801

Browse files
committed
Merge branch '4.4' into 5.3
* 4.4: Adding details about new recipes:update command php.net callback documentation link changed Revert changes related to check:security command
2 parents 8a2724a + 4f76354 commit 0b48801

File tree

5 files changed

+34
-30
lines changed

5 files changed

+34
-30
lines changed

.doctor-rst.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ whitelist:
8989
- '.. versionadded:: 1.11' # MakerBundle
9090
- '.. versionadded:: 1.3' # MakerBundle
9191
- '.. versionadded:: 1.8' # MakerBundle
92-
- '.. versionadded:: 1.6' # Flex in setup/upgrade_minor.rst
92+
- '.. versionadded:: 1.18' # Flex in setup/upgrade_minor.rst
9393
- '.. versionadded:: 1.0.0' # Encore
9494
- '0 => 123' # assertion for var_dumper - components/var_dumper.rst
9595
- '1 => "foo"' # assertion for var_dumper - components/var_dumper.rst

create_framework/templating.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,5 +178,5 @@ As always, you can decide to stop here and use the framework as is; it's
178178
probably all you need to create simple websites like those fancy one-page
179179
`websites`_ and hopefully a few others.
180180

181-
.. _`callbacks`: https://www.php.net/callback#language.types.callback
181+
.. _`callbacks`: https://www.php.net/manual/en/language.types.callable.php
182182
.. _`websites`: https://kottke.org/08/02/single-serving-sites

performance.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,12 @@ Symfony generates a file with the list of classes to preload in the
115115
116116
; php.ini
117117
opcache.preload=/path/to/project/config/preload.php
118-
118+
119119
; required for opcache.preload:
120120
opcache.preload_user=www-data
121121
122-
If this file is missing, run this command to reinstall the Symfony Flex recipe:
123-
``composer recipes:install symfony/framework-bundle --force -v``.
122+
If this file is missing, run this command to update the Symfony Flex recipe:
123+
``composer recipes:update symfony/framework-bundle``.
124124

125125
Use the :ref:`container.preload <dic-tags-container-preload>` and
126126
:ref:`container.no_preload <dic-tags-container-nopreload>` service tags to define

setup.rst

+17-8
Original file line numberDiff line numberDiff line change
@@ -233,21 +233,30 @@ require --no-unpack ...`` option to disable unpacking.
233233
Checking Security Vulnerabilities
234234
---------------------------------
235235

236-
A good and recommended security practice is to check from time to time whether your
237-
project's dependencies contain any known security vulnerabilities. You can leverage the
238-
`Local PHP Security Checker`_ to do so.
236+
The ``symfony`` binary created when you `install Symfony CLI`_ provides a command
237+
to check whether your project's dependencies contain any known security
238+
vulnerability:
239239

240-
You can also execute this process regularly to be able to
240+
.. code-block:: terminal
241+
242+
$ symfony check:security
243+
244+
A good security practice is to execute this command regularly to be able to
241245
update or replace compromised dependencies as soon as possible. The security
242246
check is done locally by fetching the public `PHP security advisories database`_,
243247
so your ``composer.lock`` file is not sent on the network.
244248

249+
The ``check:security`` command terminates with a non-zero exit code if any of
250+
your dependencies is affected by a known security vulnerability. This way you
251+
can add it to your project build process and your continuous integration
252+
workflows to make them fail when there are vulnerabilities.
253+
245254
.. tip::
246255

247-
The ``check:security`` command terminates with a non-zero exit code if
248-
any of your dependencies is affected by a known security vulnerability.
249-
This way you can add it to your project build process and your continuous
250-
integration workflows to make them fail when there are vulnerabilities.
256+
In continuous integration services you can check security vulnerabilities
257+
using a different stand-alone project called `Local PHP Security Checker`_.
258+
This is the same project used internally by ``check:security`` but much
259+
smaller in size than the entire Symfony CLI.
251260

252261
Symfony LTS Versions
253262
--------------------

setup/_update_recipes.rst.inc

+12-17
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,25 @@ it's a good idea to keep your files in sync with the recipes.
99
Symfony Flex provides several commands to help upgrade your recipes. Be sure to
1010
commit any unrelated changes you're working on before starting:
1111

12-
.. versionadded:: 1.6
12+
.. versionadded:: 1.18
1313

14-
The recipes commands were introduced in Symfony Flex 1.6.
14+
The ``recipes:update`` command was introduced in Symfony Flex 1.18.
1515

1616
.. code-block:: terminal
1717

18+
# choose an outdated recipe to update
19+
$ composer recipes:update
20+
21+
# update a specific recipe
22+
$ composer recipes:update symfony/framework-bundle
23+
1824
# see a list of all installed recipes and which have updates available
1925
$ composer recipes
2026

2127
# see detailed information about a specific recipes
2228
$ composer recipes symfony/framework-bundle
2329

24-
# update a specific recipes
25-
$ composer recipes:install symfony/framework-bundle --force -v
26-
27-
The tricky part of this process is that the recipe "update" does not perform
28-
any intelligent "upgrading" of your code. Instead, **the updates process re-installs
29-
the latest version of the recipe** which means that **your custom code will be
30-
overridden completely**. After updating a recipe, you need to carefully choose
31-
which changes you want, and undo the rest.
32-
33-
.. admonition:: Screencast
34-
:class: screencast
35-
36-
For a detailed example, see the `SymfonyCasts Symfony 5 Upgrade Tutorial`_.
37-
38-
.. _`SymfonyCasts Symfony 5 Upgrade Tutorial`: https://symfonycasts.com/screencast/symfony5-upgrade
30+
The ``recipes:update`` command is smart: it looks at the difference between the
31+
recipe when you installed it and the latest version. It then creates a patch and
32+
applies it to your app. If there are any conflicts, you can resolve them like a
33+
normal ``git`` conflict and commit like normal.

0 commit comments

Comments
 (0)