Skip to content

Commit 1725b50

Browse files
committed
minor symfony#24721 Added instructions to upgrade Symfony applications to 4.x (javiereguiluz)
This PR was merged into the 3.3 branch. Discussion ---------- Added instructions to upgrade Symfony applications to 4.x | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | no | Fixed tickets | - | License | MIT | Doc PR | - ### Context Related to symfony#24718 and lots of past questions received in Slack, Stack Overflow, etc. The UPGRADE guides are great for individual Symfony components/bundles, but we're lacking instructions to upgrade a whole Symfony app from 2.x to 3.x or from 3.x to 4.x. In the past we had problems with the changes introduced in https://github.com/symfony/symfony-standard which were not documented in the main UPGRADE files. ### Proposal We could: 1) Add a new section int he UPGRADE file to explain the upgrading process for whole Symfony apps. This is what this PR proposes (but it's still just a draft). 2) We could move the changes of this PR to a new article in the Symfony Docs. 3) We could move the entire UPGRADE files to the Symfony Docs and explain the changes for individual components and whole Symfony apps. 4) ... ? Commits ------- de4f8ac Added instructions to upgrade Symfony applications to 4.x
2 parents dfef227 + de4f8ac commit 1725b50

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

UPGRADE-4.0.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,40 @@
11
UPGRADE FROM 3.x to 4.0
22
=======================
33

4+
Symfony Framework
5+
-----------------
6+
7+
The first step to upgrade a Symfony 3.x application to 4.x is to update the
8+
file and directory structure of your application:
9+
10+
| Symfony 3.x | Symfony 4.x
11+
| ----------------------------------- | --------------------------------
12+
| `app/config/` | `config/`
13+
| `app/config/*.yml` | `config/*.yaml` and `config/packages/*.yaml`
14+
| `app/config/parameters.yml.dist` | `config/services.yaml` and `.env.dist`
15+
| `app/config/parameters.yml` | `config/services.yaml` and `.env`
16+
| `app/Resources/<BundleName>/views/` | `templates/bundles/<BundleName>/`
17+
| `app/Resources/` | `src/Resources/`
18+
| `app/Resources/assets/` | `assets/`
19+
| `app/Resources/translations/` | `translations/`
20+
| `app/Resources/views/` | `templates/`
21+
| `src/AppBundle/` | `src/`
22+
| `var/logs/` | `var/log/`
23+
| `web/` | `public/`
24+
| `web/app.php` | `public/index.php`
25+
| `web/app_dev.php` | `public/index.php`
26+
27+
Then, upgrade the contents of your console script and your front controller:
28+
29+
* `bin/console`: https://github.com/symfony/recipes/blob/master/symfony/console/3.3/bin/console
30+
* `public/index.php`: https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/3.3/public/index.php
31+
32+
Lastly, read the following article to add Symfony Flex to your application and
33+
upgrade the configuration files: https://symfony.com/doc/current/setup/flex.html
34+
35+
If you use Symfony components instead of the whole framework, you can find below
36+
the upgrading instructions for each individual bundle and component.
37+
438
ClassLoader
539
-----------
640

0 commit comments

Comments
 (0)