Skip to content

Commit

Permalink
minor symfony#24721 Added instructions to upgrade Symfony application…
Browse files Browse the repository at this point in the history
…s 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
  • Loading branch information
fabpot committed Dec 11, 2017
2 parents dfef227 + de4f8ac commit 1725b50
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions UPGRADE-4.0.md
Original file line number Diff line number Diff line change
@@ -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
-----------

Expand Down

0 comments on commit 1725b50

Please sign in to comment.