Skip to content

Commit cbac28f

Browse files
authored
chore: document major upgrade with latest versions
ref symfony#19600
1 parent fe4d0f2 commit cbac28f

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

setup/upgrade_major.rst

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Upgrading a Major Version (e.g. 5.4.0 to 6.0.0)
1+
Upgrading a Major Version (e.g. 6.4.0 to 7.0.0)
22
===============================================
33

44
Every two years, Symfony releases a new major version release (the first number
@@ -27,10 +27,10 @@ backwards incompatible changes. To accomplish this, the "old" (e.g. functions,
2727
classes, etc) code still works, but is marked as *deprecated*, indicating that
2828
it will be removed/changed in the future and that you should stop using it.
2929

30-
When the major version is released (e.g. 6.0.0), all deprecated features and
30+
When the major version is released (e.g. 7.0.0), all deprecated features and
3131
functionality are removed. So, as long as you've updated your code to stop
3232
using these deprecated features in the last version before the major (e.g.
33-
``5.4.*``), you should be able to upgrade without a problem. That means that
33+
``6.4.*``), you should be able to upgrade without a problem. That means that
3434
you should first :doc:`upgrade to the last minor version </setup/upgrade_minor>`
3535
(e.g. 5.4) so that you can see *all* the deprecations.
3636

@@ -107,7 +107,7 @@ done!
107107
.. sidebar:: Using the Weak Deprecations Mode
108108

109109
Sometimes, you can't fix all deprecations (e.g. something was deprecated
110-
in 5.4 and you still need to support 5.3). In these cases, you can still
110+
in 6.4 and you still need to support 6.3). In these cases, you can still
111111
use the bridge to fix as many deprecations as possible and then allow
112112
more of them to make your tests pass again. You can do this by using the
113113
``SYMFONY_DEPRECATIONS_HELPER`` env variable:
@@ -144,35 +144,33 @@ starting with ``symfony/`` to the new major version:
144144
"...": "...",
145145
146146
"require": {
147-
- "symfony/cache": "5.4.*",
148-
+ "symfony/cache": "6.0.*",
149-
- "symfony/config": "5.4.*",
150-
+ "symfony/config": "6.0.*",
151-
- "symfony/console": "5.4.*",
152-
+ "symfony/console": "6.0.*",
147+
- "symfony/config": "6.4.*",
148+
+ "symfony/config": "7.0.*",
149+
- "symfony/console": "6.4.*",
150+
+ "symfony/console": "7.0.*",
153151
"...": "...",
154152
155153
"...": "A few libraries starting with symfony/ follow their own
156154
versioning scheme (e.g. symfony/polyfill-[...],
157155
symfony/ux-[...], symfony/[...]-bundle).
158156
You do not need to update these versions: you can
159157
upgrade them independently whenever you want",
160-
"symfony/monolog-bundle": "^3.5",
158+
"symfony/monolog-bundle": "^3.10",
161159
},
162160
"...": "...",
163161
}
164162
165163
At the bottom of your ``composer.json`` file, in the ``extra`` block you can
166164
find a data setting for the Symfony version. Make sure to also upgrade
167-
this one. For instance, update it to ``6.0.*`` to upgrade to Symfony 6.0:
165+
this one. For instance, update it to ``7.0.*`` to upgrade to Symfony 7.0:
168166

169167
.. code-block:: diff
170168
171169
"extra": {
172170
"symfony": {
173171
"allow-contrib": false,
174-
- "require": "5.4.*"
175-
+ "require": "6.0.*"
172+
- "require": "6.4.*"
173+
+ "require": "7.0.*"
176174
}
177175
}
178176
@@ -215,13 +213,13 @@ included in the Symfony repository for any BC break that you need to be aware of
215213
Upgrading to Symfony 6: Add Native Return Types
216214
-----------------------------------------------
217215

218-
Symfony 6 will come with native PHP return types to (almost all) methods.
216+
Symfony 6 and Symfony 6 have come with native PHP return types to (almost all) methods.
219217

220218
In PHP, if the parent has a return type declaration, any class implementing
221219
or overriding the method must have the return type as well. However, you
222220
can add a return type before the parent adds one. This means that it is
223221
important to add the native PHP return types to your classes before
224-
upgrading to Symfony 6.0. Otherwise, you will get incompatible declaration
222+
upgrading to Symfony 6.0 or 7.0. Otherwise, you will get incompatible declaration
225223
errors.
226224

227225
When debug mode is enabled (typically in the dev and test environment),

0 commit comments

Comments
 (0)