-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Create composer_prevent_upgrade_conflicts.rst #8278
Conversation
I am not convinced that this is a good match for the Symfony docs. IMO this is general Composer knowledge and we should only link to their docs (probably https://getcomposer.org/doc/06-config.md#platform). If that part of the Composer documentation is not good enough, effort should better be spent in improving Composer docs as that would benefit every project and not only Symfony. |
@xabbuh sure, but reading just http://symfony.com/doc/master/setup/upgrade_patch.html and all the other available docs on symfony.com it seems that doing an upgrade is very very simple, until you do your first upgrade and see that it's not so simple... just because no one told you to specify a constraint on your composer.json in order to have your compatibility guaranteed. I suggested to add a note in setup.rst, but @wouterj suggested me to create a new file under /setup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm against this kind of thing. Using the platform
key in the composer.json
is a workaround, not a good practice, so IMO we shouldn't advertise it in the docs.
The right practice should be having a dev environment that closely matches the production servers where the app will be deployed.
See #9803 for an alternative solution to this. |
…reguiluz) This PR was merged into the 2.7 branch. Discussion ---------- Added a minor note about Composer's plaform config This is an alternative to #8278 ... we don't create a new article for this ... but we mention this problem and its solution because it's too common to ignore it. Commits ------- e61c5be Added a minor note about Composer's plaform config
you're welcome @javiereguiluz I think #9803 is a very good solution! |
As requested in #7298 (comment) I added a page regarding php version constraints in composer.json. In fact, when installing Symfony you have to meet some production server requirements.
Without that, for first install that's ok (if you read symfony requirements you can choose the right Symfony version that's shipped with the right libraries version), but doing updates (just running composer update) may break things with libraries being updated that don't meet your server requirements (e.g. php version) or may do nothing (e.g. running composer update symfony/symfony if you have 2.8.12 installed won't install 2.8.15, despite of what is said here http://symfony.com/doc/current/setup/upgrade_patch.html because of the need of twig/twig 1.30.0 - so you would run "composer update symfony/symfony twig/twig" and so on for other such dependencies to obtain the patch update - that's not so confortable!).
Best regards.