{"action":"created","issue":{"url":"https://api.github.com/repos/composer/composer/issues/4795","labels_url":"https://api.github.com/repos/composer/composer/issues/4795/labels{/name}","comments_url":"https://api.github.com/repos/composer/composer/issues/4795/comments","events_url":"https://api.github.com/repos/composer/composer/issues/4795/events","html_url":"https://github.com/composer/composer/issues/4795","id":127459987,"number":4795,"title":"\"composer update vendor/package --with-dependencies\" seems to be broken","user":{"login":"P0rnflake","id":9717287,"avatar_url":"https://avatars.githubusercontent.com/u/9717287?v=3","gravatar_id":"","url":"https://api.github.com/users/P0rnflake","html_url":"https://github.com/P0rnflake","followers_url":"https://api.github.com/users/P0rnflake/followers","following_url":"https://api.github.com/users/P0rnflake/following{/other_user}","gists_url":"https://api.github.com/users/P0rnflake/gists{/gist_id}","starred_url":"https://api.github.com/users/P0rnflake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/P0rnflake/subscriptions","organizations_url":"https://api.github.com/users/P0rnflake/orgs","repos_url":"https://api.github.com/users/P0rnflake/repos","events_url":"https://api.github.com/users/P0rnflake/events{/privacy}","received_events_url":"https://api.github.com/users/P0rnflake/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-01-19T14:40:18Z","updated_at":"2016-01-21T15:33:31Z","closed_at":null,"body":"Hi there,\r\n\r\nI recently discovered that the --with-dependencies option for the update command does not seem to work properly.\r\n\r\nThe abstract scenario is that I have 3 packages installed:\r\n\r\n    A[1.0.0]\r\n    B[1.0.0] requires A[~1.0]\r\n    C[1.0.0] requires A[~1.0]\r\n\r\nin my composer.json I just have required B and C (not A):\r\n\r\n    \"require\": {\r\n        \"B\": \"~1.0\",\r\n        \"C\": \"~1.0\"\r\n    }\r\n\r\nNow there is a new package B[1.1.0] which requires A[1.1.0].\r\n\r\nIn my Application I just want to update package B so I executed:\r\n\r\n    php composer.phar update B --with-dependencies\r\n\r\nOutput:\r\n\r\n    Nothing to install or update\r\n\r\nExpected Result:\r\n\r\nAs the dependencies from B should be updated as well, A and B should be updated, because A still matches the dependency ~1.0 from C\r\n\r\nWeird behaviour:\r\n\r\nIf I run  ```php composer.phar update A B``` it simply updates both packages.\r\n\r\nEven more weird:\r\n\r\nif I update my composer json to:\r\n\r\n     \"require\": {\r\n        \"B\": \"~1.1\",\r\n        \"C\": \"~1.0\"\r\n    }\r\n\r\nAnd after that I run \r\n\r\n    php composer.phar update B --with-dependencies\r\n\r\nThe output changes to:\r\n\r\n    Your requirements could not be resolved to an installable set of packages.\r\n\r\n    Problem 1\r\n        - Can only install one of: A[1.1.0, 1.0.0].\r\n        - Can only install one of: A[1.1.0, 1.0.0].\r\n        - Can only install one of: A[1.0.0, 1.1.0].\r\n        - B 1.1.0 requires A ~1.1.0 -> satisfiable by A[1.1.0].\r\n        - Installation request for B ~1.1 -> satisfiable by B[1.1.0].\r\n        - Installation request for A == 1.1.0.0 -> satisfiable by A[1.1.0].\r\n\r\nIs this a bug or an indented behaviour?\r\n"},"comment":{"url":"https://api.github.com/repos/composer/composer/issues/comments/173607545","html_url":"https://github.com/composer/composer/issues/4795#issuecomment-173607545","issue_url":"https://api.github.com/repos/composer/composer/issues/4795","id":173607545,"user":{"login":"alcohol","id":21414,"avatar_url":"https://avatars.githubusercontent.com/u/21414?v=3","gravatar_id":"","url":"https://api.github.com/users/alcohol","html_url":"https://github.com/alcohol","followers_url":"https://api.github.com/users/alcohol/followers","following_url":"https://api.github.com/users/alcohol/following{/other_user}","gists_url":"https://api.github.com/users/alcohol/gists{/gist_id}","starred_url":"https://api.github.com/users/alcohol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alcohol/subscriptions","organizations_url":"https://api.github.com/users/alcohol/orgs","repos_url":"https://api.github.com/users/alcohol/repos","events_url":"https://api.github.com/users/alcohol/events{/privacy}","received_events_url":"https://api.github.com/users/alcohol/received_events","type":"User","site_admin":false},"created_at":"2016-01-21T15:33:31Z","updated_at":"2016-01-21T15:33:31Z","body":"Well you said it explicitly required `1.1.0`, not `~1.0`. Changing that makes no difference though."}}