{"action":"created","issue":{"url":"https://api.github.com/repos/composer/composer/issues/5505","repository_url":"https://api.github.com/repos/composer/composer","labels_url":"https://api.github.com/repos/composer/composer/issues/5505/labels{/name}","comments_url":"https://api.github.com/repos/composer/composer/issues/5505/comments","events_url":"https://api.github.com/repos/composer/composer/issues/5505/events","html_url":"https://github.com/composer/composer/issues/5505","id":164714714,"number":5505,"title":"dev-master does not use branch-alias when compared against conflict rules (bug?)","user":{"login":"core23","id":3440437,"avatar_url":"https://avatars.githubusercontent.com/u/3440437?v=3","gravatar_id":"","url":"https://api.github.com/users/core23","html_url":"https://github.com/core23","followers_url":"https://api.github.com/users/core23/followers","following_url":"https://api.github.com/users/core23/following{/other_user}","gists_url":"https://api.github.com/users/core23/gists{/gist_id}","starred_url":"https://api.github.com/users/core23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/core23/subscriptions","organizations_url":"https://api.github.com/users/core23/orgs","repos_url":"https://api.github.com/users/core23/repos","events_url":"https://api.github.com/users/core23/events{/privacy}","received_events_url":"https://api.github.com/users/core23/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-07-10T13:01:21Z","updated_at":"2016-07-12T14:53:35Z","closed_at":null,"body":"With the following composer.json:\r\n\r\n```json\r\n{\r\n    \"name\": \"acme/test-bundle\",\r\n    \"type\": \"symfony-bundle\",\r\n    \"require\": {\r\n        \"php\": \"^5.3 || ^7.0\",\r\n        \"sonata-project/classification-bundle\": \"^4.0@dev\",\r\n        \"sonata-project/media-bundle\": \"^4.0@dev\"\r\n    }\r\n}\r\n```\r\n\r\nWhen I run this command:\r\n\r\n```\r\ncomposer update\r\n```\r\n\r\nI get this output:\r\n\r\n```\r\nYour requirements could not be resolved to an installable set of packages.\r\n\r\n  Problem 1\r\n    - Installation request for sonata-project/classification-bundle ^4.0@dev -> satisfiable by sonata-project/classification-bundle[4.x-dev].\r\n    - don't install sonata-project/media-bundle 4.x-dev|install sonata-project/media-bundle dev-master\r\n    - sonata-project/media-bundle dev-master conflicts with sonata-project/classification-bundle[4.x-dev].\r\n    - Installation request for sonata-project/media-bundle ^4.0@dev -> satisfiable by sonata-project/media-bundle[4.x-dev].\r\n```\r\n\r\nThis 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](https://github.com/sonata-project/SonataMediaBundle/blob/master/composer.json) and [classification](https://github.com/sonata-project/SonataClassificationBundle/blob/master/composer.json)).\r\n\r\nThe 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.\r\n"},"comment":{"url":"https://api.github.com/repos/composer/composer/issues/comments/232072904","html_url":"https://github.com/composer/composer/issues/5505#issuecomment-232072904","issue_url":"https://api.github.com/repos/composer/composer/issues/5505","id":232072904,"user":{"login":"Seldaek","id":183678,"avatar_url":"https://avatars.githubusercontent.com/u/183678?v=3","gravatar_id":"","url":"https://api.github.com/users/Seldaek","html_url":"https://github.com/Seldaek","followers_url":"https://api.github.com/users/Seldaek/followers","following_url":"https://api.github.com/users/Seldaek/following{/other_user}","gists_url":"https://api.github.com/users/Seldaek/gists{/gist_id}","starred_url":"https://api.github.com/users/Seldaek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Seldaek/subscriptions","organizations_url":"https://api.github.com/users/Seldaek/orgs","repos_url":"https://api.github.com/users/Seldaek/repos","events_url":"https://api.github.com/users/Seldaek/events{/privacy}","received_events_url":"https://api.github.com/users/Seldaek/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T14:53:35Z","updated_at":"2016-07-12T14:53:35Z","body":"Yup the problem seems to be that for requires, we allow either dev-master OR the alias to work, but for conflict as well it conflicts with either dev-master OR the alias, while for conflict it really only shouldn't conflict if the alias allows it, but I'm not sure this is solvable. Aliases are a convenience but they are also a hack to some extent and making them work in all edge cases might not be feasible reasonably.\r\n\r\nMaybe you can drop the `>=5` conflict, or turn it into a `>=5 && <99`, that should solve it I assume."}}
{"actor":{"display_login":"Seldaek"}}