composer: dev-master does not use branch-alias when compared against conflict rules (bug?)

With the following composer.json:

{
    "name": "acme/test-bundle",
    "type": "symfony-bundle",
    "require": {
        "php": "^5.3 || ^7.0",
        "sonata-project/classification-bundle": "^4.0@dev",
        "sonata-project/media-bundle": "^4.0@dev"
    }
}

When I run this command:

composer update

I get this output:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for sonata-project/classification-bundle ^4.0@dev -> satisfiable by sonata-project/classification-bundle[4.x-dev].
    - don't install sonata-project/media-bundle 4.x-dev|install sonata-project/media-bundle dev-master
    - sonata-project/media-bundle dev-master conflicts with sonata-project/classification-bundle[4.x-dev].
    - Installation request for sonata-project/media-bundle ^4.0@dev -> satisfiable by sonata-project/media-bundle[4.x-dev].

This should resolve in installing both libraries in the latest master branch versions, because both have a branch-alias "dev-master": "4.x-dev". Both library have a cyclic dependency (media and classification).

The classification bundle has also a conflict setting, which prevents installing a version greater or lower 4.x. The upper rule seams to be the problem, because when I removed the upper conflict rule (>= 5.0) the dependencies could be resolved. Refs https://github.com/sonata-project/SonataClassificationBundle/pull/224.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 3
  • Comments: 17 (16 by maintainers)

Commits related to this issue

Most upvoted comments

Yup sorry about the misleading comment 😃 >=5 <999 should do.