Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 80aceb0

Browse files
committed
bug #8796 Upgrading the upgrade docs (weaverryan)
This PR was merged into the 4.0 branch. Discussion ---------- Upgrading the upgrade docs Commits ------- 431b0b9 upgrading the upgrade docs
2 parents c7a3093 + 431b0b9 commit 80aceb0

File tree

4 files changed

+23
-21
lines changed

4 files changed

+23
-21
lines changed

setup/flex.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ Symfony application by executing the following command:
124124
recommended since Symfony 3.3. Use the Composer ``create-project`` command
125125
instead.
126126

127+
.. _upgrade-to-flex:
128+
127129
Upgrading Existing Applications to Flex
128130
---------------------------------------
129131

setup/upgrade_major.rst

Lines changed: 15 additions & 15 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. 2.7.0 to 3.0.0)
4+
Upgrading a Major Version (e.g. 3.4.0 to 4.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. 3.0.0), all deprecated features and
33+
When the major version is released (e.g. 4.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-
2.8.*), you should be able to upgrade without a problem.
36+
3.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
@@ -95,7 +95,7 @@ done!
9595
.. sidebar:: Using the Weak Deprecations Mode
9696

9797
Sometimes, you can't fix all deprecations (e.g. something was deprecated
98-
in 2.8 and you still need to support 2.7). In these cases, you can still
98+
in 3.4 and you still need to support 3.3). In these cases, you can still
9999
use the bridge to fix as many deprecations as possible and then switch
100100
to the weak test mode to make your tests pass again. You can do this by
101101
using the ``SYMFONY_DEPRECATIONS_HELPER`` env variable:
@@ -113,12 +113,6 @@ done!
113113
114114
(you can also execute the command like ``SYMFONY_DEPRECATIONS_HELPER=weak phpunit``).
115115

116-
.. tip::
117-
118-
Some members of the Symfony Community have developed a tool called
119-
`Symfony-Upgrade-Fixer`_ which automatically fixes some of the most common
120-
deprecations found when upgrading from Symfony 2 to Symfony 3.
121-
122116
.. _upgrade-major-symfony-composer:
123117

124118
2) Update to the New Major Version via Composer
@@ -133,7 +127,7 @@ Composer by modifying your ``composer.json`` file:
133127
"...": "...",
134128
135129
"require": {
136-
"symfony/symfony": "3.0.*",
130+
"symfony/symfony": "^4.0",
137131
},
138132
"...": "..."
139133
}
@@ -153,10 +147,16 @@ Next, use Composer to download new versions of the libraries:
153147
3) Update your Code to Work with the New Version
154148
------------------------------------------------
155149

156-
There is a good chance that you're done now! However, the next major version
157-
*may* also contain new BC breaks as a BC layer is not always a possibility.
158-
Make sure you read the ``UPGRADE-X.0.md`` (where X is the new major version)
159-
included in the Symfony repository for any BC break that you need to be aware
150+
The next major version *may* also contain new BC breaks as a BC layer is not always
151+
a possibility. Make sure you read the ``UPGRADE-X.0.md`` (where X is the new major
152+
version) included in the Symfony repository for any BC break that you need to be aware
160153
of.
161154

155+
4) Updating to the Symfony 4 Flex Directory Structure
156+
-----------------------------------------------------
157+
158+
When upgrading to Symfony 4, you will probably also want to upgrade to the new
159+
Symfony 4 directory structure so that you can take advantage of Symfony Flex.
160+
This takes some work, but is optional. For details, see :ref:`upgrade-to-flex`.
161+
162162
.. _`Symfony-Upgrade-Fixer`: https://github.com/umpirsky/Symfony-Upgrade-Fixer

setup/upgrade_minor.rst

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

4-
Upgrading a Minor Version (e.g. 2.5.3 to 2.6.1)
4+
Upgrading a Minor Version (e.g. 3.3.3 to 3.4.0)
55
===============================================
66

77
If you're upgrading a minor version (where the middle number changes), then
@@ -30,7 +30,7 @@ to use the new version:
3030
"...": "...",
3131
3232
"require": {
33-
"symfony/symfony": "2.6.*",
33+
"symfony/symfony": "3.4.*",
3434
},
3535
"...": "...",
3636
}
@@ -55,12 +55,12 @@ to your code to get everything working. Additionally, some features you're
5555
using might still work, but might now be deprecated. While that's just fine,
5656
if you know about these deprecations, you can start to fix them over time.
5757

58-
Every version of Symfony comes with an UPGRADE file (e.g. `UPGRADE-2.7.md`_)
58+
Every version of Symfony comes with an UPGRADE file (e.g. `UPGRADE-3.4.md`_)
5959
included in the Symfony directory that describes these changes. If you follow
6060
the instructions in the document and update your code accordingly, it should be
6161
safe to update in the future.
6262

6363
These documents can also be found in the `Symfony Repository`_.
6464

6565
.. _`Symfony Repository`: https://github.com/symfony/symfony
66-
.. _`UPGRADE-2.7.md`: https://github.com/symfony/symfony/blob/2.7/UPGRADE-2.7.md
66+
.. _`UPGRADE-3.4.md`: https://github.com/symfony/symfony/blob/3.4/UPGRADE-3.4.md

setup/upgrade_patch.rst

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

4-
Upgrading a Patch Version (e.g. 2.6.0 to 2.6.1)
4+
Upgrading a Patch Version (e.g. 3.3.2 to 3.3.3)
55
===============================================
66

77
When a new patch version is released (only the last number changed), it is a
@@ -15,7 +15,7 @@ version is *really* easy:
1515
That's it! You should not encounter any backwards-compatibility breaks or
1616
need to change anything else in your code. That's because when you started
1717
your project, your ``composer.json`` included Symfony using a constraint
18-
like ``2.6.*``, where only the *last* version number will change when you
18+
like ``3.3.*``, where only the *last* version number will change when you
1919
update.
2020

2121
.. tip::

0 commit comments

Comments
 (0)