From 11d87ad0540ac23e64a79d6769dae3d170a30bc7 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Fri, 17 Dec 2021 12:49:59 -0500 Subject: [PATCH] Adding details about new recipes:update command --- .doctor-rst.yaml | 2 +- performance.rst | 5 ++++- setup/_update_recipes.rst.inc | 29 ++++++++++++----------------- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/.doctor-rst.yaml b/.doctor-rst.yaml index 0e72bb4f3e2..6ef4959d8f9 100644 --- a/.doctor-rst.yaml +++ b/.doctor-rst.yaml @@ -88,7 +88,7 @@ whitelist: - '.. versionadded:: 1.11' # MakerBundle - '.. versionadded:: 1.3' # MakerBundle - '.. versionadded:: 1.8' # MakerBundle - - '.. versionadded:: 1.6' # Flex in setup/upgrade_minor.rst + - '.. versionadded:: 1.18' # Flex in setup/upgrade_minor.rst - '0 => 123' # assertion for var_dumper - components/var_dumper.rst - '1 => "foo"' # assertion for var_dumper - components/var_dumper.rst - '$var .= "Because of this `\xE9` octet (\\xE9),\n";' diff --git a/performance.rst b/performance.rst index 5c1992dc134..0753861a9ca 100644 --- a/performance.rst +++ b/performance.rst @@ -115,10 +115,13 @@ You can configure PHP to use this preload file: ; php.ini opcache.preload=/path/to/project/config/preload.php - + ; required for opcache.preload: opcache.preload_user=www-data +If this file is missing, run this command to update the Symfony Flex recipe: +``composer recipes:update symfony/framework-bundle``. + .. _performance-configure-opcache: Configure OPcache for Maximum Performance diff --git a/setup/_update_recipes.rst.inc b/setup/_update_recipes.rst.inc index da963380ce1..98dff8ddcb8 100644 --- a/setup/_update_recipes.rst.inc +++ b/setup/_update_recipes.rst.inc @@ -9,30 +9,25 @@ 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 +.. versionadded:: 1.18 - The recipes commands were introduced in Symfony Flex 1.6. + The ``recipes:update`` command was introduced in Symfony Flex 1.18. .. code-block:: terminal + # choose an outdated recipe to update + $ composer recipes:update + + # update a specific recipe + $ composer recipes:update symfony/framework-bundle + # 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 +The ``recipes:update`` command is smart: it looks at the difference between the +recipe when you installed it and the latest version. It then creates a patch and +applies it to your app. If there are any conflicts, you can resolve them like a +normal ``git`` conflict and commit like normal.