-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Different way for updating flex projects #9962
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
Conversation
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.
Thanks for this! I found a new flag that I think can help simplify things
setup/upgrade_minor.rst
Outdated
"symfony/twig-bundle": "^4.1", | ||
"symfony/validator": "^4.1", | ||
"symfony/web-link": "^4.1", | ||
"symfony/yaml": "^4.1" |
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.
Because all dependencies will now use the ^4.0
format, the user actually should not need to update anything in their composer.json file (as ^4.0
will allow them to upgrade to 4.1). So, let's remove this. We could instead add a quick note to about this at the bottom:
Your composer.json file should already be configured to allow your Symfony packages to be upgraded minor versions. But, if a package was not upgraded that should have been, check your
composer.json
setup/_update_dep_errors.rst.inc
Outdated
@@ -6,7 +6,7 @@ other Symfony dependencies too. In that case, try the following command: | |||
|
|||
.. code-block:: terminal | |||
|
|||
$ composer update symfony/symfony --with-dependencies | |||
$ composer update "symfony/*" --with-dependencies |
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.
In Composer 1.6, apparently there is a --with-all-dependencies
. This looks like what we want.
But then, because this new flag works the way we want it to, the user should never have version constraint problems anymore. So, we can add this flag to the other commands, then probably remove this section.
setup/upgrade_minor.rst
Outdated
@@ -39,7 +49,7 @@ Next, use Composer to download new versions of the libraries: | |||
|
|||
.. code-block:: terminal | |||
|
|||
$ composer update symfony/symfony | |||
$ composer update "symfony/*" |
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.
Add --with-all-dependencies
setup/upgrade_patch.rst
Outdated
@@ -10,12 +10,12 @@ version is *really* easy: | |||
|
|||
.. code-block:: terminal | |||
|
|||
$ composer update symfony/symfony | |||
$ composer update "symfony/*" |
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.
Add --with-all-dependencies
After a bit of chatting about this, we should completely "erase" the contents of
So, in Symfony 4, there is no point to upgrading only a patch version. Of course, a user can choose to control their dependencies in a more custom, tighter way. But the official recommendation is just to allow your minor versions to upgrade - it's safe. It should simplify things :) |
@martijnhartlief will you be able to make the changes asked for by Ryan? Thanks! |
I tested these instructions updating from 4.0 to 4.1. Worked very well, look forward to them being merged! |
@javiereguiluz @weaverryan I hope the changes are correctly added now. |
This PR was squashed before being merged into the 4.0 branch (closes #9962). Discussion ---------- Different way for updating flex projects Since flex doesn't use symfony/symfony, I changed update symfony/symfony into "symfony/*" to update all Symfony packages. Commits ------- 339b5bd Different way for updating flex projects
@martijnhartlief thanks ... and congrats on your first Symfony Docs contribution! We made some minor tweaks and formatting to it after merging. See cef13f8 |
Since flex doesn't use symfony/symfony, I changed update symfony/symfony into "symfony/*" to update all Symfony packages.