minor #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 #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
-------

de4f8ac21d Added instructions to upgrade Symfony applications to 4.x
This commit is contained in:
Fabien Potencier 2017-12-11 15:22:19 -08:00
commit 1725b50929
1 changed files with 34 additions and 0 deletions

View File

@ -1,6 +1,40 @@
UPGRADE FROM 3.x to 4.0
=======================
Symfony Framework
-----------------
The first step to upgrade a Symfony 3.x application to 4.x is to update the
file and directory structure of your application:
| Symfony 3.x | Symfony 4.x
| ----------------------------------- | --------------------------------
| `app/config/` | `config/`
| `app/config/*.yml` | `config/*.yaml` and `config/packages/*.yaml`
| `app/config/parameters.yml.dist` | `config/services.yaml` and `.env.dist`
| `app/config/parameters.yml` | `config/services.yaml` and `.env`
| `app/Resources/<BundleName>/views/` | `templates/bundles/<BundleName>/`
| `app/Resources/` | `src/Resources/`
| `app/Resources/assets/` | `assets/`
| `app/Resources/translations/` | `translations/`
| `app/Resources/views/` | `templates/`
| `src/AppBundle/` | `src/`
| `var/logs/` | `var/log/`
| `web/` | `public/`
| `web/app.php` | `public/index.php`
| `web/app_dev.php` | `public/index.php`
Then, upgrade the contents of your console script and your front controller:
* `bin/console`: https://github.com/symfony/recipes/blob/master/symfony/console/3.3/bin/console
* `public/index.php`: https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/3.3/public/index.php
Lastly, read the following article to add Symfony Flex to your application and
upgrade the configuration files: https://symfony.com/doc/current/setup/flex.html
If you use Symfony components instead of the whole framework, you can find below
the upgrading instructions for each individual bundle and component.
ClassLoader
-----------