Skip to content

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

Closed
wants to merge 2 commits into from

Conversation

martijnhartlief
Copy link

Since flex doesn't use symfony/symfony, I changed update symfony/symfony into "symfony/*" to update all Symfony packages.

Copy link
Member

@weaverryan weaverryan left a 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

"symfony/twig-bundle": "^4.1",
"symfony/validator": "^4.1",
"symfony/web-link": "^4.1",
"symfony/yaml": "^4.1"
Copy link
Member

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

@@ -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
Copy link
Member

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.

@@ -39,7 +49,7 @@ Next, use Composer to download new versions of the libraries:

.. code-block:: terminal

$ composer update symfony/symfony
$ composer update "symfony/*"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add --with-all-dependencies

@@ -10,12 +10,12 @@ version is *really* easy:

.. code-block:: terminal

$ composer update symfony/symfony
$ composer update "symfony/*"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add --with-all-dependencies

@weaverryan
Copy link
Member

After a bit of chatting about this, we should completely "erase" the contents of upgrade_patch.rst, and replace it with a message like:

To upgrade to a new "patch" release, see the :doc:Upgrading a Minor Version </setup/upgrade_minor> documentation. Thanks to Symfony's backwards compatibility promise, it's always safe to upgrade to the latest "minor" version.

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 :)

@javiereguiluz
Copy link
Member

@martijnhartlief will you be able to make the changes asked for by Ryan? Thanks!

@pbowyer
Copy link
Contributor

pbowyer commented Jul 16, 2018

I tested these instructions updating from 4.0 to 4.1. Worked very well, look forward to them being merged!

@martijnhartlief
Copy link
Author

@javiereguiluz @weaverryan I hope the changes are correctly added now.

@javiereguiluz javiereguiluz added this to the 4.0 milestone Jul 24, 2018
javiereguiluz added a commit that referenced this pull request Jul 24, 2018
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
@javiereguiluz
Copy link
Member

@martijnhartlief thanks ... and congrats on your first Symfony Docs contribution!

We made some minor tweaks and formatting to it after merging. See cef13f8

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.

6 participants