8000 Add an explain section to update symfony recipes by maxhelias · Pull Request #13320 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Add an explain section to update symfony recipes #13320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions setup/_update_recipes.rst.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
3) Updating Recipes
-------------------

Over time - and especially when you upgrade to a new version of a library - an
updated version of the :ref:`recipe <recipes-description>` may be available.
These updates are usually minor - e.g. new comments in a configuration file - but
it's a good idea to keep your files in sync with the recipes.

Symfony Flex provides several commands to help upgrade your recipes. Be sure to
commit any unrelated changes you're working on before starting:

.. versionadded:: 1.6

The recipes commands were introduced in Symfony Flex 1.6.

.. code-block:: terminal

# see a list of all installed recipes and which have updates available
$ composer recipes

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

# update a specific recipes
$ composer recipes:install symfony/framework-bundle --force -v

The tricky part of this process is that the recipe "update" does not perform
any intelligent "upgrading" of your code. Instead, **the updates process re-installs
the latest version of the recipe** which means that **your custom code will be
overridden completely**. After updating a recipe, you need to carefully choose
which changes you want, and undo the rest.

.. admonition:: Screencast
:class: screencast

For a detailed example, see the `SymfonyCasts Symfony 5 Upgrade Tutorial`_.

.. _`SymfonyCasts Symfony 5 Upgrade Tutorial`: https://symfonycasts.com/screencast/symfony5-upgrade
6 changes: 4 additions & 2 deletions setup/upgrade_major.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Now, you can start fixing the notices:
OK (10 tests, 20 assertions)

Remaining deprecation notices (6)

The "request" service is deprecated and will be removed in 3.0. Add a type-hint for
Symfony\Component\HttpFoundation\Request to your controller parameters to retrieve the
request instead: 6x
Expand Down Expand Up @@ -178,7 +178,9 @@ Next, use Composer to download new versions of the libraries:

.. _upgrade-major-symfony-after:

3) Update your Code to Work with the New Version
.. include:: /setup/_update_recipes.rst.inc

4) Update your Code to Work with the New Version
------------------------------------------------

In some rare situations, the next major version *may* contain backwards-compatibility
Expand Down
38 changes: 1 addition & 37 deletions setup/upgrade_minor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,43 +91,7 @@ These documents can also be found in the `Symfony Repository`_.

.. _updating-flex-recipes:

3) Updating Recipes
-------------------

Over time - and especially when you upgrade to a new version of a library - an
updated version of the :ref:`recipe <recipes-description>` may be available.
These updates are usually minor - e.g. new comments in a configuration file - but
it's a good idea to update the core Symfony recipes.

Symfony Flex provides several commands to help upgrade your recipes. Be sure to
commit any unrelated changes you're working on before starting:

.. versionadded:: 1.6

The recipes commands were introduced in Symfony Flex 1.6.

.. code-block:: terminal

# see a list of all installed recipes and which have updates available
$ composer recipes

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

# update a specific recipes
$ composer recipes:install symfony/framework-bundle --force -v

The tricky part of this process is that the recipe "update" does not perform
any intelligent "upgrading" of your code. Instead, **the updates process re-installs
the latest version of the recipe** which means that **your custom code will be
overridden completely**. After updating a recipe, you need to carefully choose
which changes you want, and undo the rest.

.. admonition:: Screencast
:class: screencast

For a detailed example, see the `SymfonyCasts Symfony 5 Upgrade Tutorial`_.
.. include:: /setup/_update_recipes.rst.inc

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