|
1 | 1 | UPGRADE FROM 3.x to 4.0
|
2 | 2 | =======================
|
3 | 3 |
|
| 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 | + |
4 | 38 | ClassLoader
|
5 | 39 | -----------
|
6 | 40 |
|
|
0 commit comments