Skip to content

Add note on composer update dependency mismatch #13710

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 3 commits into from

Conversation

Steveb-p
Copy link
Contributor

On branches other that master or version branches (existing in Symfony repository) composer update command will fail, since those cannot be installed.

For example, when I've tried to run tests for Redis Messenger message rejection commit, I've got this error output (trimmed a little, and I was on a specific commit, but it happens on branches as well):

$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - doctrine/orm 2.4.x-dev requires symfony/console ~2.0 -> satisfiable by symfony/console[2.0.4
...
    - don't install symfony/console 2.0.4|remove symfony/symfony dev-b40c1abf9ace9411747a9655dabcb560457bf88d
    - don't install symfony/console 2.0.5|remove symfony/symfony dev-b40c1abf9ace9411747a9655dabcb560457bf88d
    - don't install symfony/console 2.0.6|remove symfony/symfony dev-b40c1abf9ace9411747a9655dabcb560457bf88d
    - don't install symfony/console 2.0.7|remove symfony/symfony dev-b40c1abf9ace9411747a9655dabcb560457bf88d
...

Figured I have to be on one of existing Symfony branches for the install to proceed, and once I've switched to master, I was good to go.

Is the selected doc branch correct in this PR? Is the wording in the tip ok?

On branches other that master or version branches (existing in Symfony repository) composer update command will fail, since those cannot be installed.
@@ -24,6 +24,11 @@ tests, such as Doctrine, Twig and Monolog. To do so,

$ composer update

.. tip::

You need to be on ``master`` or version branch (e.g. ``5.1``). Otherwise some dependencies
Copy link
Member

Choose a reason for hiding this comment

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

I would show the usage of the COMPOSER_ROOT_VERSION env var instead like this:

COMPOSER_ROOT_VERSION=5.1.x-dev symfony composer update

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't know it works like that actually 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@xabbux I changed the tip accordingly. Is the wording ok?

Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we shouldn't simply always make use of the env var and simply add a sentence like "replace 5.1 with the Symfony version your patch targets" or so.

@Steveb-p Steveb-p changed the title Add note on composer update required branch Add note on composer update dependency mismatch May 27, 2020
@nicolas-grekas nicolas-grekas deleted the branch symfony:master December 7, 2020 16:34
@nicolas-grekas
Copy link
Member

This PR has been closed because the master has been removed.
Please submit it again against the appropriate branch.

javiereguiluz added a commit that referenced this pull request Apr 21, 2022
… default branch (MatTheCat)

This PR was merged into the 4.4 branch.

Discussion
----------

Tell about COMPOSER_ROOT_VERSION when not working on the default branch

Just hit #13710 so here it goes again!

Commits
-------

0e21ee1 Tell about COMPOSER_ROOT_VERSION when not working on the default branch
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.

4 participants