{"action":"created","issue":{"url":"https://api.github.com/repos/composer/composer/issues/4710","repository_url":"https://api.github.com/repos/composer/composer","labels_url":"https://api.github.com/repos/composer/composer/issues/4710/labels{/name}","comments_url":"https://api.github.com/repos/composer/composer/issues/4710/comments","events_url":"https://api.github.com/repos/composer/composer/issues/4710/events","html_url":"https://github.com/composer/composer/issues/4710","id":122381761,"number":4710,"title":"Repository priority is ignored when dependent package added.","user":{"login":"simesy","id":188856,"avatar_url":"https://avatars.githubusercontent.com/u/188856?v=3","gravatar_id":"","url":"https://api.github.com/users/simesy","html_url":"https://github.com/simesy","followers_url":"https://api.github.com/users/simesy/followers","following_url":"https://api.github.com/users/simesy/following{/other_user}","gists_url":"https://api.github.com/users/simesy/gists{/gist_id}","starred_url":"https://api.github.com/users/simesy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simesy/subscriptions","organizations_url":"https://api.github.com/users/simesy/orgs","repos_url":"https://api.github.com/users/simesy/repos","events_url":"https://api.github.com/users/simesy/events{/privacy}","received_events_url":"https://api.github.com/users/simesy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/composer/composer/labels/Bug","name":"Bug","color":"e10c02"},{"url":"https://api.github.com/repos/composer/composer/labels/Solver","name":"Solver","color":"e102d8"}],"state":"closed","locked":false,"assignee":{"login":"naderman","id":154844,"avatar_url":"https://avatars.githubusercontent.com/u/154844?v=3","gravatar_id":"","url":"https://api.github.com/users/naderman","html_url":"https://github.com/naderman","followers_url":"https://api.github.com/users/naderman/followers","following_url":"https://api.github.com/users/naderman/following{/other_user}","gists_url":"https://api.github.com/users/naderman/gists{/gist_id}","starred_url":"https://api.github.com/users/naderman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naderman/subscriptions","organizations_url":"https://api.github.com/users/naderman/orgs","repos_url":"https://api.github.com/users/naderman/repos","events_url":"https://api.github.com/users/naderman/events{/privacy}","received_events_url":"https://api.github.com/users/naderman/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/composer/composer/milestones/6","html_url":"https://github.com/composer/composer/milestones/Bugs","labels_url":"https://api.github.com/repos/composer/composer/milestones/6/labels","id":162532,"number":6,"title":"Bugs","description":"Bugs that have to be looked at","creator":{"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},"open_issues":63,"closed_issues":103,"state":"open","created_at":"2012-08-18T15:15:20Z","updated_at":"2016-02-24T17:47:20Z","due_on":null,"closed_at":null},"comments":12,"created_at":"2015-12-15T22:28:27Z","updated_at":"2016-02-24T18:14:49Z","closed_at":"2016-02-24T17:47:20Z","body":"Composer ignores the higher priority repository of PackageA (`drupal/migrate_plus`) when I add a PackageB (`drupal/migrate_tools`) that depends on PackageA (where PackageA is also listed in the  repository that PackageB is listed in).\r\n\r\nThis is my composer.json. With this setup, `drupal/migrate_plus` is cloned from `github.com:simesy/migrate_plus.git`.\r\n\r\n    {\r\n        \"name\": \"somethin/somethin\",\r\n        \"type\": \"project\",\r\n        \"license\": \"GPL-2.0+\",\r\n        \"repositories\": [\r\n            {\r\n                \"type\": \"vcs\",\r\n                \"url\": \"git@github.com:simesy/migrate_plus.git\"\r\n            },\r\n            {\r\n                \"type\": \"composer\",\r\n                \"url\": \"https://packagist.drupal-composer.org\"\r\n            }        \r\n        ],\r\n        \"require\": {\r\n            \"drupal/migrate_plus\": \"dev-8.x-1.x\",\r\n        },\r\n        \"minimum-stability\": \"dev\",\r\n        \"prefer-stable\": true\r\n    }\r\n\r\nWhen I add `drupal/migrate_tools\": \"dev-8.x-1.x\"` (see below), which has a dependency on migrate_plus, and run `composer update`, the migrate_plus package is replaced by the source defined by `packagist.drupal-composer.org` - my custom repo is ignored, even though it has a higher priority.\r\n\r\n    {\r\n        \"name\": \"somethin/somethin\",\r\n        \"type\": \"project\",\r\n        \"license\": \"GPL-2.0+\",\r\n        \"repositories\": [\r\n            {\r\n                \"type\": \"vcs\",\r\n                \"url\": \"git@github.com:simesy/migrate_plus.git\"\r\n            },\r\n            {\r\n                \"type\": \"composer\",\r\n                \"url\": \"https://packagist.drupal-composer.org\"\r\n            }        \r\n        ],\r\n        \"require\": {\r\n            \"drupal/migrate_plus\": \"dev-8.x-1.x\",\r\n            \"drupal/migrate_tools\": \"dev-8.x-1.x\"\r\n        },\r\n        \"minimum-stability\": \"dev\",\r\n        \"prefer-stable\": true\r\n    }\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/composer/composer/issues/comments/188388357","html_url":"https://github.com/composer/composer/issues/4710#issuecomment-188388357","issue_url":"https://api.github.com/repos/composer/composer/issues/4710","id":188388357,"user":{"login":"naderman","id":154844,"avatar_url":"https://avatars.githubusercontent.com/u/154844?v=3","gravatar_id":"","url":"https://api.github.com/users/naderman","html_url":"https://github.com/naderman","followers_url":"https://api.github.com/users/naderman/followers","following_url":"https://api.github.com/users/naderman/following{/other_user}","gists_url":"https://api.github.com/users/naderman/gists{/gist_id}","starred_url":"https://api.github.com/users/naderman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naderman/subscriptions","organizations_url":"https://api.github.com/users/naderman/orgs","repos_url":"https://api.github.com/users/naderman/repos","events_url":"https://api.github.com/users/naderman/events{/privacy}","received_events_url":"https://api.github.com/users/naderman/received_events","type":"User","site_admin":false},"created_at":"2016-02-24T18:14:49Z","updated_at":"2016-02-24T18:14:49Z","body":"@alcohol they are notified already"}}