From 64b5716815bc9a4ae7e3fb8166456cbb8ed5801e Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 25 Jan 2024 11:34:55 +0100 Subject: [PATCH] [Upgrading] Recommend to delete cache when upgrading to a major version --- setup/upgrade_major.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/setup/upgrade_major.rst b/setup/upgrade_major.rst index 8c5b5cab8a3..9841a2496bd 100644 --- a/setup/upgrade_major.rst +++ b/setup/upgrade_major.rst @@ -182,6 +182,19 @@ Next, use Composer to download new versions of the libraries: $ composer update "symfony/*" +A best practice after updating to a new major version is to clear the cache. +Instead of running the ``cache:clear`` command (which won't work if the application +is not bootable in the console after the upgrade) it's better to remove the entire +cache directory contents: + +.. code-block:: terminal + + # run this command on Linux and macOS + $ rm -rf var/cache/* + + # run this command on Windows + C:\> rmdir /s /q var\cache\* + .. include:: /setup/_update_dep_errors.rst.inc .. include:: /setup/_update_all_packages.rst.inc