Skip to content

Commit 50236f8

Browse files
committed
Merge branch '4.4' into 5.0
* 4.4: Fixed duplicated text #12633 Update \"upgrading\" guide for Symfony5 Update "upgrading" guide for Symfony5 [Messenger] Update version constraint for Redis extension
2 parents 5d3ab26 + 755c0d4 commit 50236f8

File tree

2 files changed

+29
-17
lines changed

2 files changed

+29
-17
lines changed

messenger.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ The Redis transport uses `streams`_ to queue messages.
885885
# Full DSN Example
886886
MESSENGER_TRANSPORT_DSN=redis://password@localhost:6379/messages/symfony/consumer?auto_setup=true&serializer=1&stream_max_entries=0&dbindex=0
887887
888-
To use the Redis transport, you will need the Redis PHP extension (^4.3) and
888+
To use the Redis transport, you will need the Redis PHP extension (>=4.3) and
889889
a running Redis server (^5.0).
890890

891891
A number of options can be configured via the DSN or via the ``options`` key

setup/upgrade_major.rst

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. index::
22
single: Upgrading; Major Version
33

4-
Upgrading a Major Version (e.g. 3.4.0 to 4.1.0)
4+
Upgrading a Major Version (e.g. 4.4.0 to 5.0.0)
55
===============================================
66

77
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,
3030
classes, etc) code still works, but is marked as *deprecated*, indicating that
3131
it will be removed/changed in the future and that you should stop using it.
3232

33-
When the major version is released (e.g. 4.1.0), all deprecated features and
33+
When the major version is released (e.g. 5.0.0), all deprecated features and
3434
functionality are removed. So, as long as you've updated your code to stop
3535
using these deprecated features in the last version before the major (e.g.
36-
3.4.*), you should be able to upgrade without a problem.
36+
4.4.*), you should be able to upgrade without a problem.
3737

3838
To help you with this, deprecation notices are triggered whenever you end up
3939
using a deprecated feature. When visiting your application in the
@@ -82,7 +82,7 @@ Now, you can start fixing the notices:
8282
OK (10 tests, 20 assertions)
8383
8484
Remaining deprecation notices (6)
85-
85+
8686
The "request" service is deprecated and will be removed in 3.0. Add a type-hint for
8787
Symfony\Component\HttpFoundation\Request to your controller parameters to retrieve the
8888
request instead: 6x
@@ -96,7 +96,7 @@ done!
9696
.. sidebar:: Using the Weak Deprecations Mode
9797

9898
Sometimes, you can't fix all deprecations (e.g. something was deprecated
99-
in 3.4 and you still need to support 3.3). In these cases, you can still
99+
in 4.4 and you still need to support 4.3). In these cases, you can still
100100
use the bridge to fix as many deprecations as possible and then allow
101101
more of them to make your tests pass again. You can do this by using the
102102
``SYMFONY_DEPRECATIONS_HELPER`` env variable:
@@ -123,25 +123,44 @@ done!
123123
2) Update to the New Major Version via Composer
124124
-----------------------------------------------
125125

126-
Once your code is deprecation free, you can update the Symfony library via
127-
Composer by modifying your ``composer.json`` file:
126+
Once your code is deprecation free, you can update all the Symfony packages via
127+
Composer by modifying your ``composer.json`` file. In this file update all
128+
mentions of ``4.*`` to ``5.0.*``:
128129

129130
.. code-block:: json
130131
131132
{
132133
"...": "...",
133134
134135
"require": {
135-
"symfony/symfony": "^4.1",
136+
"symfony/console": "^5.0",
137+
"symfony/dotenv": "^5.0",
138+
"symfony/flex": "^1.3.1",
139+
"symfony/framework-bundle": "^5.0",
140+
"symfony/validator": "^5.0",
141+
"symfony/yaml": "^5.0"
136142
},
137143
"...": "..."
138144
}
139145
146+
At the bottom of your ``composer.json`` file, in the ``extra`` block you can
147+
find a data setting for the symfony version. Make sure to also upgrade
148+
this one. For instance, update it to ``5.0.*`` to upgrade to Symfony 5.0:
149+
150+
.. code-block:: json
151+
152+
"extra": {
153+
"symfony": {
154+
"allow-contrib": false,
155+
"require": "5.0.*"
156+
}
157+
}
158+
140159
Next, use Composer to download new versions of the libraries:
141160

142161
.. code-block:: terminal
143162
144-
$ composer update symfony/symfony
163+
$ composer update "symfony/*"
145164
146165
.. include:: /setup/_update_dep_errors.rst.inc
147166

@@ -156,10 +175,3 @@ The next major version *may* also contain new BC breaks as a BC layer is not alw
156175
a possibility. Make sure you read the ``UPGRADE-X.0.md`` (where X is the new major
157176
version) included in the Symfony repository for any BC break that you need to be aware
158177
of.
159-
160-
4) Updating to the Symfony 4 Flex Directory Structure
161-
-----------------------------------------------------
162-
163-
When upgrading to Symfony 4, you will probably also want to upgrade to the new
164-
Symfony 4 directory structure so that you can take advantage of Symfony Flex.
165-
This takes some work, but is optional. For details, see :doc:`/setup/flex`.

0 commit comments

Comments
 (0)