{"action":"created","issue":{"url":"https://api.github.com/repos/composer/composer/issues/4753","labels_url":"https://api.github.com/repos/composer/composer/issues/4753/labels{/name}","comments_url":"https://api.github.com/repos/composer/composer/issues/4753/comments","events_url":"https://api.github.com/repos/composer/composer/issues/4753/events","html_url":"https://github.com/composer/composer/issues/4753","id":125247644,"number":4753,"title":"Require a package which depends on a branch-aliased package fails","user":{"login":"kminh","id":6402124,"avatar_url":"https://avatars.githubusercontent.com/u/6402124?v=3","gravatar_id":"","url":"https://api.github.com/users/kminh","html_url":"https://github.com/kminh","followers_url":"https://api.github.com/users/kminh/followers","following_url":"https://api.github.com/users/kminh/following{/other_user}","gists_url":"https://api.github.com/users/kminh/gists{/gist_id}","starred_url":"https://api.github.com/users/kminh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kminh/subscriptions","organizations_url":"https://api.github.com/users/kminh/orgs","repos_url":"https://api.github.com/users/kminh/repos","events_url":"https://api.github.com/users/kminh/events{/privacy}","received_events_url":"https://api.github.com/users/kminh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/composer/composer/labels/Support","name":"Support","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-06T19:42:36Z","updated_at":"2016-01-08T05:31:37Z","closed_at":null,"body":"Hi,\r\n\r\nI must be missing something pretty basic here, but this setup doesn't seem to work:\r\n\r\n**There are 3 packages:**\r\n\r\n```\r\npkg1\\composer.json\r\n\r\n{\r\n    \"name\": \"test/pkg1\",\r\n    \"repositories\": [\r\n        {\r\n            \"type\": \"vcs\",\r\n            \"url\": \"../pkg2\"\r\n        },\r\n        {\r\n            \"type\": \"vcs\",\r\n            \"url\": \"../pkg3\"\r\n        }\r\n    ],\r\n    \"require\": {\r\n        \"test/pkg2\": \"~1.0\"\r\n    }\r\n}\r\n\r\npkg2\\composer.json\r\n\r\n{\r\n    \"name\": \"test/pkg2\",\r\n    \"repositories\": [\r\n        {\r\n            \"type\": \"vcs\",\r\n            \"url\": \"../pkg3\"\r\n        }\r\n    ],\r\n    \"require\": {\r\n        \"test/pkg3\": \"1.0.*@dev\"\r\n    }\r\n}\r\n\r\npkg3\\composer.json\r\n\r\n{\r\n    \"name\": \"test/pkg3\",\r\n    \"extra\": {\r\n        \"branch-alias\": {\r\n            \"dev-master\": \"1.0.x-dev\"\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nAll packages are git repositories, `pkg2` has a `1.0.0` tag.\r\n\r\nThis is the output of `composer update --no-plugins`:\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 test/pkg2 ~1.0 -> satisfiable by test/pkg2[1.0.0].\r\n    - test/pkg2 1.0.0 requires test/pkg3 1.0.x-dev -> no matching package found.\r\n```\r\n\r\nIf I add `\"test/pkg3\": \"1.0.*@dev\"` to the `require` block of `pkg1` it works fine. So is it required that any branch-aliased dependencies must be added to the root composer.json?\r\n\r\nThanks for any insight."},"comment":{"url":"https://api.github.com/repos/composer/composer/issues/comments/169900611","html_url":"https://github.com/composer/composer/issues/4753#issuecomment-169900611","issue_url":"https://api.github.com/repos/composer/composer/issues/4753","id":169900611,"user":{"login":"kminh","id":6402124,"avatar_url":"https://avatars.githubusercontent.com/u/6402124?v=3","gravatar_id":"","url":"https://api.github.com/users/kminh","html_url":"https://github.com/kminh","followers_url":"https://api.github.com/users/kminh/followers","following_url":"https://api.github.com/users/kminh/following{/other_user}","gists_url":"https://api.github.com/users/kminh/gists{/gist_id}","starred_url":"https://api.github.com/users/kminh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kminh/subscriptions","organizations_url":"https://api.github.com/users/kminh/orgs","repos_url":"https://api.github.com/users/kminh/repos","events_url":"https://api.github.com/users/kminh/events{/privacy}","received_events_url":"https://api.github.com/users/kminh/received_events","type":"User","site_admin":false},"created_at":"2016-01-08T05:31:37Z","updated_at":"2016-01-08T05:31:37Z","body":"@alcohol ah yes, forgot to mention but I've tried that too and it works, but I don't think it's an ideal solution.\r\n\r\nSo I take that this is expected and I must either set the `minimum-stability` to `dev` or require the aliased package explicitly? I wonder why though, since the documentation doesn't say anything about the `branch-alias` being root-only."}}