8000 minor #13320 Add an explain section to update symfony recipes (maxhel… · symfony/symfony-docs@bec8616 · GitHub
[go: up one dir, main page]

Skip to content

Commit bec8616

Browse files
committed
minor #13320 Add an explain section to update symfony recipes (maxhelias)
This PR was merged into the 4.4 branch. Discussion ---------- Add an explain section to update symfony recipes More documentation about new command for update recipe Commits ------- 7f4325d Add an explain section to update symfony recipes
2 parents caa6858 + 7f4325d commit bec8616

File tree

3 files changed

+43
-39
lines changed

3 files changed

+43
-39
lines changed

setup/_update_recipes.rst.inc

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
3) Updating Recipes
2+
-------------------
3+
4+
Over time - and especially when you upgrade to a new version of a library - an
5+
updated version of the :ref:`recipe <recipes-description>` may be available.
6+
These updates are usually minor - e.g. new comments in a c 8000 onfiguration file - but
7+
it's a good idea to keep your files in sync with the recipes.
8+
9+
Symfony Flex provides several commands to help upgrade your recipes. Be sure to
10+
commit any unrelated changes you're working on before starting:
11+
12+
.. versionadded:: 1.6
13+
14+
The recipes commands were introduced in Symfony Flex 1.6.
15+
16+
.. code-block:: terminal
17+
18+
# see a list of all installed recipes and which have updates available
19+
$ composer recipes
20+
21+
# see detailed information about a specific recipes
22+
$ composer recipes symfony/framework-bundle
23+
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

setup/upgrade_major.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Now, you can start fixing the notices:
8484
OK (10 tests, 20 assertions)
8585
8686
Remaining deprecation notices (6)
87-
87+
8888
The "request" service is deprecated and will be removed in 3.0. Add a type-hint for
8989
Symfony\Component\HttpFoundation\Request to your controller parameters to retrieve the
9090
request instead: 6x
@@ -178,7 +178,9 @@ Next, use Composer to download new versions of the libraries:
178178

179179
.. _upgrade-major-symfony-after:
180180

181-
3) Update your Code to Work with the New Version
181+
.. include:: /setup/_update_recipes.rst.inc
182+
183+
4) Update your Code to Work with the New Version
182184
------------------------------------------------
183185

184186
In some rare situations, the next major version *may* contain backwards-compatibili 8000 ty

setup/upgrade_minor.rst

Lines changed: 1 addition & 37 deletions
67E6
Original file line numberDiff line numberDiff line change
@@ -91,43 +91,7 @@ These documents can also be found in the `Symfony Repository`_.
9191

9292
.. _updating-flex-recipes:
9393

94-
3) Updating Recipes
95-
-------------------
96-
97-
Over time - and especially when you upgrade to a new version of a library - an
98-
updated version of the :ref:`recipe <recipes-description>` may be available.
99-
These updates are usually minor - e.g. new comments in a configuration file - but
100-
it's a good idea to update the core Symfony recipes.
101-
102-
Symfony Flex provides several commands to help upgrade your recipes. Be sure to
103-
commit any unrelated changes you're working on before starting:
104-
105-
.. versionadded:: 1.6
106-
107-
The recipes commands were introduced in Symfony Flex 1.6.
108-
109-
.. code-block:: terminal
110-
111-
# see a list of all installed recipes and which have updates available
112-
$ composer recipes
113-
114-
# see detailed information about a specific recipes
115-
$ composer recipes symfony/framework-bundle
116-
117-
# update a specific recipes
118-
$ composer recipes:install symfony/framework-bundle --force -v
119-
120-
The tricky part of this process is that the recipe "update" does not perform
121-
any intelligent "upgrading" of your code. Instead, **the updates process re-installs
122-
the latest version of the recipe** which means that **your custom code will be
123-
overridden completely**. After updating a recipe, you need to carefully choose
124-
which changes you want, and undo the rest.
125-
126-
.. admonition:: Screencast
127-
:class: screencast
128-
129-
For a detailed example, see the `SymfonyCasts Symfony 5 Upgrade Tutorial`_.
94+
.. include:: /setup/_update_recipes.rst.inc
13095

13196
.. _`Symfony Repository`: https://github.com/symfony/symfony
13297
.. _`UPGRADE-4.4.md`: https://github.com/symfony/symfony/blob/4.4/UPGRADE-4.4.md
133-
.. _`SymfonyCasts Symfony 5 Upgrade Tutorial`: https://symfonycasts.com/screencast/symfony5-upgrade

0 commit comments

Comments
 (0)
0