Skip to content

Commit c98c1e8

Browse files
committed
Merge branch '7.0' into 7.1
* 7.0: chore: document major upgrade with latest versions chore: document minor upgrade with latest versions
2 parents 98ce6aa + 657ba77 commit c98c1e8

File tree

2 files changed

+25
-29
lines changed

2 files changed

+25
-29
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 7 added 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),

setup/upgrade_minor.rst

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Upgrading a Minor Version (e.g. 5.0.0 to 5.1.0)
1+
Upgrading a Minor Version (e.g. 6.3.0 to 6.4.0)
22
===============================================
33

44
If you're upgrading a minor version (where the middle number changes), then
@@ -21,27 +21,25 @@ There are two steps to upgrading a minor version:
2121
The ``composer.json`` file is configured to allow Symfony packages to be
2222
upgraded to patch versions. But to upgrade to a new minor version, you will
2323
probably need to update the version constraint next to each library starting
24-
``symfony/``. Suppose you are upgrading from Symfony 5.3 to 5.4:
24+
``symfony/``. Suppose you are upgrading from Symfony 6.3 to 6.4:
2525

2626
.. code-block:: diff
2727
2828
{
2929
"...": "...",
3030
3131
"require": {
32-
- "symfony/cache": "5.3.*",
33-
+ "symfony/cache": "5.4.*",
34-
- "symfony/config": "5.3.*",
35-
+ "symfony/config": "5.4.*",
36-
- "symfony/console": "5.3.*",
37-
+ "symfony/console": "5.4.*",
32+
- "symfony/config": "6.3.*",
33+
+ "symfony/config": "6.4.*",
34+
- "symfony/console": "6.3.*",
35+
+ "symfony/console": "6.4.*",
3836
"...": "...",
3937
4038
"...": "A few libraries starting with
4139
symfony/ follow their own versioning scheme. You
4240
do not need to update these versions: you can
4341
upgrade them independently whenever you want",
44-
"symfony/monolog-bundle": "^3.5",
42+
"symfony/monolog-bundle": "^3.10",
4543
},
4644
"...": "...",
4745
}
@@ -54,8 +52,8 @@ Your ``composer.json`` file should also have an ``extra`` block that you will
5452
"extra": {
5553
"symfony": {
5654
"...": "...",
57-
- "require": "5.3.*"
58-
+ "require": "5.4.*"
55+
- "require": "6.3.*"
56+
+ "require": "6.4.*"
5957
}
6058
}
6159
@@ -79,7 +77,7 @@ to your code to get everything working. Additionally, some features you're
7977
using might still work, but might now be deprecated. While that's fine,
8078
if you know about these deprecations, you can start to fix them over time.
8179

82-
Every version of Symfony comes with an UPGRADE file (e.g. `UPGRADE-5.4.md`_)
80+
Every version of Symfony comes with an UPGRADE file (e.g. `UPGRADE-6.4.md`_)
8381
included in the Symfony directory that describes these changes. If you follow
8482
the instructions in the document and update your code accordingly, it should be
8583
safe to update in the future.
@@ -97,5 +95,5 @@ These documents can also be found in the `Symfony Repository`_.
9795
.. include:: /setup/_update_recipes.rst.inc
9896

9997
.. _`Symfony Repository`: https://github.com/symfony/symfony
100-
.. _`UPGRADE-5.4.md`: https://github.com/symfony/symfony/blob/5.4/UPGRADE-5.4.md
98+
.. _`UPGRADE-6.4.md`: https://github.com/symfony/symfony/blob/6.4/UPGRADE-6.4.md
10199
.. _`Rector`: https://github.com/rectorphp/rector

0 commit comments

Comments
 (0)