From edb21017d97209c2a283f73390482cfe3d3f20c4 Mon Sep 17 00:00:00 2001 From: Javier Spagnoletti Date: Fri, 22 Nov 2019 19:04:54 -0300 Subject: [PATCH 1/2] [Messenger] Update version constraint for Redis extension --- messenger.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/messenger.rst b/messenger.rst index bd6246b078d..fedec6d681c 100644 --- a/messenger.rst +++ b/messenger.rst @@ -902,7 +902,7 @@ The Redis transport uses `streams`_ to queue messages. The ``dbindex`` query parameter in Redis DSN was introduced in Symfony 4.4. -To use the Redis transport, you will need the Redis PHP extension (^4.3) and +To use the Redis transport, you will need the Redis PHP extension (>=4.3) and a running Redis server (^5.0). A number of options can be configured via the DSN or via the ``options`` key @@ -1088,7 +1088,7 @@ Possible options to configure with tags are: * ``priority`` .. versionadded:: 4.4 - + The ability to specify ``from_transport`` on the tag, was added in Symfony 4.4. Handler Subscriber & Options From 498dff9e8f1ef78ce0ddf153d27d8a35be7edb3d Mon Sep 17 00:00:00 2001 From: ThomasGallet <31954419+ThomasGallet@users.noreply.github.com> Date: Sat, 23 Nov 2019 13:15:13 +0100 Subject: [PATCH 2/2] Update "upgrading" guide for Symfony5 Come from #12633 issue --- setup/upgrade_major.rst | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/setup/upgrade_major.rst b/setup/upgrade_major.rst index 56b25062646..77c72970ed0 100644 --- a/setup/upgrade_major.rst +++ b/setup/upgrade_major.rst @@ -1,7 +1,7 @@ .. index:: single: Upgrading; Major Version -Upgrading a Major Version (e.g. 3.4.0 to 4.1.0) +Upgrading a Major Version (e.g. 4.4.0 to 5.0.0) =============================================== Every two years, Symfony releases a new major version release (the first number @@ -30,10 +30,10 @@ backwards incompatible changes. To accomplish this, the "old" (e.g. functions, classes, etc) code still works, but is marked as *deprecated*, indicating that it will be removed/changed in the future and that you should stop using it. -When the major version is released (e.g. 4.1.0), all deprecated features and +When the major version is released (e.g. 5.0.0), all deprecated features and functionality are removed. So, as long as you've updated your code to stop using these deprecated features in the last version before the major (e.g. -3.4.*), you should be able to upgrade without a problem. +4.4.*), you should be able to upgrade without a problem. To help you with this, deprecation notices are triggered whenever you end up using a deprecated feature. When visiting your application in the @@ -82,7 +82,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 @@ -96,7 +96,7 @@ done! .. sidebar:: Using the Weak Deprecations Mode Sometimes, you can't fix all deprecations (e.g. something was deprecated - in 3.4 and you still need to support 3.3). In these cases, you can still + in 4.4 and you still need to support 4.3). In these cases, you can still use the bridge to fix as many deprecations as possible and then allow more of them to make your tests pass again. You can do this by using the ``SYMFONY_DEPRECATIONS_HELPER`` env variable: @@ -123,7 +123,7 @@ done! 2) Update to the New Major Version via Composer ----------------------------------------------- -Once your code is deprecation free, you can update the Symfony library via +Once your code is deprecation free, you can update all the Symfony packages via Composer by modifying your ``composer.json`` file: .. code-block:: json @@ -132,16 +132,33 @@ Composer by modifying your ``composer.json`` file: "...": "...", "require": { - "symfony/symfony": "^4.1", + "symfony/console": "^5.0", + "symfony/dotenv": "^5.0", + "symfony/framework-bundle": "^5.0", + "symfony/validator": "^5.0", + "symfony/yaml": "^5.0" }, "...": "..." } + +At the bottom of your ``composer.json`` file, in the ``extra`` block you can +find a data setting for the symfony version. Make sure to also upgrade +this one. For instance, update it to ``5.0.*`` to upgrade to Symfony 5.0: + +.. code-block:: json + + "extra": { + "symfony": { + "allow-contrib": false, + "require": "5.0.*" + } + } Next, use Composer to download new versions of the libraries: .. code-block:: terminal - $ composer update symfony/symfony + $ composer update "symfony/*" .. include:: /setup/_update_dep_errors.rst.inc @@ -157,9 +174,3 @@ a possibility. Make sure you read the ``UPGRADE-X.0.md`` (where X is the new maj version) included in the Symfony repository for any BC break that you need to be aware of. -4) Updating to the Symfony 4 Flex Directory Structure ------------------------------------------------------ - -When upgrading to Symfony 4, you will probably also want to upgrade to the new -Symfony 4 directory structure so that you can take advantage of Symfony Flex. -This takes some work, but is optional. For details, see :doc:`/setup/flex`.