@@ -26,7 +26,7 @@ There are a couple of steps to upgrading a major version:
26
26
During the lifecycle of a major release, new features are added and method
27
27
signatures and public API usages are changed. However,
28
28
:doc: `minor versions </cookbook/upgrade/minor_version >` should not contain any
29
- backwards compatibility changes. To accomplish this, the "old" (e.g. functions,
29
+ backwards incompatible changes. To accomplish this, the "old" (e.g. functions,
30
30
classes, etc) code still works, but is marked as *deprecated *, indicating that
31
31
it will be removed/changed in the future and that you should stop using it.
32
32
@@ -35,13 +35,27 @@ functionality are removed. So, as long as you've updated your code to stop
35
35
using these deprecated features in the last version before the major (e.g.
36
36
2.8.*), you should be able to upgrade without a problem.
37
37
38
- To help you with this, the last minor releases will trigger deprecated notices.
39
- For example, 2.7 and 2.8 trigger deprecated notices . When visiting your
40
- application in the :doc: `dev environment </cookbook/configuration/environments >`
38
+ To help you with this, deprecation notices are triggered whenever you end up
39
+ using a deprecated feature . When visiting your application in the
40
+ :doc: `dev environment </cookbook/configuration/environments >`
41
41
in your browser, these notices are shown in the web dev toolbar:
42
42
43
43
.. image :: /images/cookbook/deprecations-in-profiler.png
44
44
45
+ Of course ultimately, you want to stop using the deprecated functionality.
46
+ Sometimes, this is easy: the warning might tell you exactly what to change.
47
+
48
+ But other times, the warning might be unclear: a setting somewhere might
49
+ cause a class deeper to trigger the warning. In this case, Symfony does its
50
+ best to give a clear message, but you may need to research that warning further.
51
+
52
+ And sometimes, the warning may come from a third-party library or bundle
53
+ that you're using. If that's true, there's a good chance that those deprecations
54
+ have already been updated. In that case, upgrade the library to fix them.
55
+
56
+ Once all the deprecation warnings are gone, you can upgrade with a lot
57
+ more confidence.
58
+
45
59
Deprecations in PHPUnit
46
60
~~~~~~~~~~~~~~~~~~~~~~~
47
61
@@ -52,7 +66,7 @@ To make sure this doesn't happen, you can install the PHPUnit bridge:
52
66
53
67
.. code-block :: bash
54
68
55
- $ composer require symfony/phpunit-bridge
69
+ $ composer require --dev symfony/phpunit-bridge
56
70
57
71
Now, your tests execute normally and a nice summary of the deprecation notices
58
72
is displayed at the end of the test report:
0 commit comments