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

Adding a paragraph about updating multiple packages during an update #5336

Closed
wants to merge 3 commits into from

Conversation

weaverryan
Copy link
Member

Q A
Doc fix? no
New docs? no
Applies to 2.3+
Fixed tickets n/a

Hi guys!

For my 2.7 upgrade, I needed to run composer update symfony/symfony twig/twig. I'm trying to include a note to help other people. I'd appreciate opinions on wording :).

Thanks!

@weaverryan
Copy link
Member Author

Note: Meant to be merged into 2.3

@wouterj
Copy link
Member

wouterj commented May 29, 2015

Isn't this quite strange? Composer update should trigger a partial update afaik, which means it should also update twig/twig if a newer version is required. Are we sure Symfony has the correct version constraint for twig?

@xabbuh
Copy link
Member

xabbuh commented May 30, 2015

Yeah, that sounds weird.

@weaverryan Do you remember what required you to use a newer Twig version than the one you had installed?

@javiereguiluz
Copy link
Member

In my case I didn't have problems with Twig but with some Doctrine dependencies. I know that you won't agree but I believe that when you perform a "brutal update" (like updating Symfony version) you should always execute composer update instead of updating just a minor set of packages.

@weaverryan
Copy link
Member Author

@xabbuh: yes, symfony/symfony required a newer version of twig/twig than I had installed. I have no twig/twig in my composer.json. So I also thought that Composer would be smart enough to update twig, even though it's not an arg in my update command, but that's not the case.

So what should we do? The error - and getting it working- is confusing. But the brutal update (with no args) really means people need to have great version constraints.

@javiereguiluz - was your error with doctrine/common? I'm wondering because maybe this is solved (or mostly solved) if you update symfony/symfony + whatever libs it depends on directly.

Thanks!

@wouterj
Copy link
Member

wouterj commented May 30, 2015

Maybe @Seldaek can give us some clues if this behaviour is the expected one (composer update symfony/symfony only updating symfony/symfony and not its dependencies) and we should document how to work around it or if this is actually a bug in Composer?

From a usage point of view, the current behaviour seems rather strange/hard to use.

@javiereguiluz
Copy link
Member

@weaverryan in my case it was a problem with Doctrine fixtures ... but it only happened in one project. I'm afraid that there are so many different constraints configurations, that for a lot of developers doing composer update symfony/symfony won't work :(

@xabbuh
Copy link
Member

xabbuh commented May 30, 2015

@weaverryan @javiereguiluz I'm curious. Could you please show how your composer.json file looked like before the update?

@Seldaek
Copy link
Member

Seldaek commented May 30, 2015

Composer used to be smart enough as you say and update dependencies as well when you did a partial update, but then for some packages you end up updating half the project, so it's not so great. Either you have to whitelist all the deps yourself or you can use composer update --with-dependencies symfony/symfony and then it'll include the deps automatically but it might end up updating more than you'd like it to.

@wouterj
Copy link
Member

wouterj commented May 31, 2015

Thanks for the information @Seldaek. So I think we should change the instructions to composer update --with-dependencies symfony/symfony as it seems to be at least a bit safer than composer update for people that don't have the knowledge to write good version constraints.

@weaverryan
Copy link
Member Author

I just updated this with --with-dependencies - it has indeed helped a lot of people to use that for the 2.7 upgrade.

@xabbuh
Copy link
Member

xabbuh commented Jun 9, 2015

👍

$ composer update symfony/symfony --with-dependencies

This updates ``symfony/symfony`` and *all* packages that it depends on,
will include several other packages. By using tight version constraints in
Copy link
Member

Choose a reason for hiding this comment

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

The second part of the first sentences doesn't sound quite right. Maybe something like "which will include several other packages. [...]" is better?

weaverryan added a commit that referenced this pull request Jun 22, 2015
…ing an update (weaverryan)

This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #5336).

Discussion
----------

Adding a paragraph about updating multiple packages during an update

| Q             | A
| ------------- | ---
| Doc fix?      | no
| New docs?     | no
| Applies to    | 2.3+
| Fixed tickets | n/a

Hi guys!

For my 2.7 upgrade, I needed to run `composer update symfony/symfony twig/twig`. I'm trying to include a note to help other people. I'd appreciate opinions on wording :).

Thanks!

Commits
-------

bb0acd0 fixing bad wording
8a30d14 using --with-dependencies
7a28919 Adding a paragraph about updating multiple packages at once during an upgrade
@weaverryan weaverryan closed this Jun 22, 2015
@xabbuh xabbuh deleted the update-dep-errors branch June 23, 2015 06:23
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