Skip to content
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

stoccc
Copy link
Contributor

@stoccc stoccc commented Aug 11, 2017

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.

@xabbuh
Copy link
Member

xabbuh commented Aug 16, 2017

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.

@stoccc
Copy link
Contributor Author

stoccc commented Aug 17, 2017

@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

Copy link
Contributor

@Jean85 Jean85 left a 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.

@javiereguiluz
Copy link
Member

See #9803 for an alternative solution to this.

javiereguiluz added a commit that referenced this pull request May 24, 2018
…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
@javiereguiluz
Copy link
Member

@stoccc we finally merged #9803, so we're closing here ... but thanks again for your contribution and for helping us improve Symfony Docs!

@stoccc
Copy link
Contributor Author

stoccc commented May 24, 2018

you're welcome @javiereguiluz I think #9803 is a very good solution!

@stoccc stoccc deleted the setup/composer_prevent_upgrade_conflicts.rst branch May 24, 2018 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants