Skip to content

Latest commit

 

History

History
66 lines (44 loc) · 2.19 KB

upgrade_minor.rst

File metadata and controls

66 lines (44 loc) · 2.19 KB
.. index::
    single: Upgrading; Minor Version

Upgrading a Minor Version (e.g. 2.5.3 to 2.6.1)

If you're upgrading a minor version (where the middle number changes), then you should not encounter significant backward compatibility changes. For details, see the :doc:`Symfony backward compatibility promise </contributing/code/bc>`.

However, some backwards-compatibility breaks are possible and you'll learn in a second how to prepare for them.

There are two steps to upgrading a minor version:

  1. :ref:`Update the Symfony library via Composer <upgrade-minor-symfony-composer>`;
  2. :ref:`Update your code to work with the new version <upgrade-minor-symfony-code>`.

1) Update the Symfony Library via Composer

First, you need to update Symfony by modifying your composer.json file to use the new version:

{
    "...": "...",

    "require": {
        "symfony/symfony": "2.6.*",
    },
    "...": "...",
}

Next, use Composer to download new versions of the libraries:

$ composer update symfony/symfony

2) Updating your Code to Work with the new Version

In theory, you should be done! However, you may need to make a few changes to your code to get everything working. Additionally, some features you're using might still work, but might now be deprecated. While that's just fine, if you know about these deprecations, you can start to fix them over time.

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

These documents can also be found in the Symfony Repository.