{"action":"closed","issue":{"url":"https://api.github.com/repos/composer/composer/issues/4711","labels_url":"https://api.github.com/repos/composer/composer/issues/4711/labels{/name}","comments_url":"https://api.github.com/repos/composer/composer/issues/4711/comments","events_url":"https://api.github.com/repos/composer/composer/issues/4711/events","html_url":"https://github.com/composer/composer/issues/4711","id":122473414,"number":4711,"title":"Dependecy dependent dependencies","user":{"login":"carnage","id":846596,"avatar_url":"https://avatars.githubusercontent.com/u/846596?v=3","gravatar_id":"","url":"https://api.github.com/users/carnage","html_url":"https://github.com/carnage","followers_url":"https://api.github.com/users/carnage/followers","following_url":"https://api.github.com/users/carnage/following{/other_user}","gists_url":"https://api.github.com/users/carnage/gists{/gist_id}","starred_url":"https://api.github.com/users/carnage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carnage/subscriptions","organizations_url":"https://api.github.com/users/carnage/orgs","repos_url":"https://api.github.com/users/carnage/repos","events_url":"https://api.github.com/users/carnage/events{/privacy}","received_events_url":"https://api.github.com/users/carnage/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-16T10:34:19Z","updated_at":"2015-12-16T18:39:49Z","closed_at":"2015-12-16T18:39:48Z","body":":)\r\n\r\nGiven the significant differences between php 5.x and 7.x there could be a project which requires different dependencies dependent on which platform it is running on eg: requiring random_compat if php is less than 7. It would be quite useful if composer could support this directly to avoid libraries having to maintain multiple versions.\r\n\r\nSyntax for this would need to be reasonably complex something like\r\n\r\n\"require-if\": {\r\n{ \"require\": {\"random_compat\":\"1.0.0\"}, \"if\": {\"php\": \"<7.0.0\"}}\r\n}"}}