-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Update setup.rst #7298
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
Update setup.rst #7298
Conversation
I Added a paragraph regarding php version constraints in composer.json. In fact, when installing Symfony you have to meet some production server requirements. Maybe you should consider adding a page in the documentation that could better explain these need and this configuration line. 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.
@stoccc thanks for your contribution! The setup article is the most critical content for us, so we review anything added/changed very carefully. I hope you understand it. Regarding your proposal, the Symfony Standard Edition (and therefore, the Symfony Installer too) already defines this option to avoid the problems you mentioned. For example: PHP 5.3.9 in Sf 2.8 (https://github.com/symfony/symfony-standard/blob/2.8/composer.json#L43) and PHP 5.5.9 in Sf 3.2 (https://github.com/symfony/symfony-standard/blob/3.2/composer.json#L48). So please, tell me how did you experience the issue of not having defined this option. Thanks! |
@javiereguiluz I tried again installing using the symfony installer just downloaded from here https://symfony.com/installer Even if I don't specify the symfony version, the generated composer.json doesn't contain the constraint on php version. Any idea? Best regards ps neither the symfony demo application contains that constraint |
Can you show the complete contents of the |
sure, here you are.
|
I'm very sorry but I was completely wrong in my previous message. It's true that Symfony defines the if (isset($composerConfig['config']['platform']['php'])) {
unset($composerConfig['config']['platform']['php']);
...
} Why do we do this? It's OK for Symfony to define that setting, because when we build the packages we do a However, if the Symfony Installer keeps this option, developers using PHP 7 in their computers/server can't install newer packages that are compatible with PHP 7 when doing a So it seems that we need to add some note about this, as your propose here. |
thank you for your explanation, it's a pleasure to contribute to the symfony project. |
Hi @stoccc! I'm very sorry for the long delay on this PR from our side. We've shortly discussed this PR in the doc team today and I've some good news: We like your idea of mentioning the fix for this common problem! However, we don't like the location of the current proposal. The setup guide is the first article people see when using Symfony. It should be super simple, super fun and to-the-point. Setting up this version in Composer to prevent broken deployments seems more a deployment/upgrade thing. Can you please move this section to it's own sub-guide under So in short: Perfect section, but please move it to it's own article :) If you can do that, it'll be perfect. If you no longer have the time/motivation, I perfectly understand and we can take this over (while keeping your credits of course). |
Hi @wouterj
I'll do the job in a few days (I'm new to GitHub :) )
2017-04-15 16:34 GMT+02:00 Wouter J <notifications@github.com>:
… Hi @stoccc <https://github.com/stoccc>!
I'm very sorry for the long delay on this PR from our side. We've shortly
discussed this PR in the doc team today and I've some good news: We like
your idea of mentioning the fix for this common problem! However, we don't
like the location of the current proposal. The setup guide is the first
article people see when using Symfony. It should be super simple, super fun
and to-the-point.
Setting up this version in Composer to prevent broken deployments seems
more a deployment/upgrade thing. Can you please move this section to it's
own sub-guide under /setup/? You can call it e.g. "How to prevent PHP
conflicts when using Composer". The contents can be equal to the current
section content, maybe with a small description of what this does ("setting
the PHP version used by Composer to check requirements").
So in short: Perfect section, but please move it to it's own article :) If
you can do that, it'll be perfect. If you no longer have the
time/motivation, I perfectly understand and we can take this over (while
keeping your credits of course).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7298 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AXqHI1rtzgG1eaqCAemDnCz3ivzRlLeJks5rwNVagaJpZM4LW2P3>
.
|
ping @stoccc :) Would you like to finish this PR? |
restored current setup.rst
mmmh looks like I did a mistake :) |
maybe should I add a new PR and close this one? |
I Added a paragraph 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.