Skip to content

Create composer_prevent_upgrade_conflicts.rst #8278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions setup/composer_prevent_upgrade_conflicts.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

.. index::
double: Composer; Conflicts

How to prevent PHP conflicts during upgrades when using Composer
================================================================

Each Symfony release is guaranteed to work with a specific PHP version,
so for example when you download and install Symfony 2.8 you are
sure that it can work on PHP 5.4.16.

When you upgrade Symfony (e.g. from 2.8.25 to 2.8.26) you must be sure that
all the upgraded dependencies are still compatible with your own PHP version
running in your production server (e.g. the old PHP 5.4.16).

Achieving this is very simple: just remember to add such constraints in your
``composer.json`` file located in your project root directory (my_project_name),
so that when you will launch updates that would not be a pain. Just replace these lines::

// my_project_name/composer.json
"config": {
"bin-dir": "bin"
},

with these::

// my_project_name/composer.json
"config": {
"bin-dir": "bin",
"platform": {
"php": "5.4.16"
}
},

and enjoy your Symfony upgrades.