{"action":"created","issue":{"url":"https://api.github.com/repos/composer/composer/issues/3762","labels_url":"https://api.github.com/repos/composer/composer/issues/3762/labels{/name}","comments_url":"https://api.github.com/repos/composer/composer/issues/3762/comments","events_url":"https://api.github.com/repos/composer/composer/issues/3762/events","html_url":"https://github.com/composer/composer/issues/3762","id":58250178,"number":3762,"title":"Schema proposal, moving php from requirements (and some additional stuff)","user":{"login":"mormy","id":210259,"avatar_url":"https://avatars.githubusercontent.com/u/210259?v=3","gravatar_id":"","url":"https://api.github.com/users/mormy","html_url":"https://github.com/mormy","followers_url":"https://api.github.com/users/mormy/followers","following_url":"https://api.github.com/users/mormy/following{/other_user}","gists_url":"https://api.github.com/users/mormy/gists{/gist_id}","starred_url":"https://api.github.com/users/mormy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mormy/subscriptions","organizations_url":"https://api.github.com/users/mormy/orgs","repos_url":"https://api.github.com/users/mormy/repos","events_url":"https://api.github.com/users/mormy/events{/privacy}","received_events_url":"https://api.github.com/users/mormy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-19T18:42:43Z","updated_at":"2015-02-20T13:15:42Z","closed_at":null,"body":"Hi, \r\n\r\nI have had a discussion with some colleagues and basically the point is this... System libraries and PHP version shouldn't be specified under \"requirements\" ... It's very confusing for beginners to differentiate between system libs and project components this way. \r\n\r\nTherefore I propose a new element to be added to the schema. Example below... This is only a proposal and I'd appreciate any input.\r\n\r\n```json\r\n{\r\n  \"name\": \"ACMEProject\",\r\n  \"description\" : \"Some ACME corp project\",\r\n  \"minimum-stability\": \"dev\",\r\n  \"php-version\": \">=5.4.0\", \r\n  \"platform\": { \r\n    \"php-ext\": { \r\n      \"ext-gd\": \"*\",\r\n      \"ext-pgsql\": \"*\"\r\n    },\r\n    \"libs\": {\r\n      \"external-deps-for-php-ext\" : \"*\"\r\n    },\r\n    \"services\": {\r\n      \"postgresql\": \"*\",\r\n      \"nginx\": \"*\",\r\n      \"php-fpm\": \"*\" \r\n    },    \r\n  },\r\n  \"require\": {\r\n      \"php\": \">=5.4.0\",\r\n      \"silex/silex\": \"1.0.*\",\r\n      \"doctrine/dbal\": \"2.2.*\",\r\n      \"monolog/monolog\": \">=1.0.0\"\r\n  },\r\n  \"autoload\": {\r\n      \"psr-0\": {\r\n        \"ACME\": \"src/\"\r\n      }\r\n   }\r\n}\r\n```\r\nThis way the project and it's requirements, could be made much more clear. It's probably not a perfect proposal, or the best thought out scheme (maybe it's better suited for the config object), but IMO, describing the whole sw/libs requirements for running the composer package is great. \r\n\r\nP.S. php version is mentioned in two places... Backward compatibiltiy, easily removed/renamed :)"},"comment":{"url":"https://api.github.com/repos/composer/composer/issues/comments/75236038","html_url":"https://github.com/composer/composer/issues/3762#issuecomment-75236038","issue_url":"https://api.github.com/repos/composer/composer/issues/3762","id":75236038,"user":{"login":"mormy","id":210259,"avatar_url":"https://avatars.githubusercontent.com/u/210259?v=3","gravatar_id":"","url":"https://api.github.com/users/mormy","html_url":"https://github.com/mormy","followers_url":"https://api.github.com/users/mormy/followers","following_url":"https://api.github.com/users/mormy/following{/other_user}","gists_url":"https://api.github.com/users/mormy/gists{/gist_id}","starred_url":"https://api.github.com/users/mormy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mormy/subscriptions","organizations_url":"https://api.github.com/users/mormy/orgs","repos_url":"https://api.github.com/users/mormy/repos","events_url":"https://api.github.com/users/mormy/events{/privacy}","received_events_url":"https://api.github.com/users/mormy/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T13:15:42Z","updated_at":"2015-02-20T13:15:42Z","body":"@RQuadling that too ofc... \r\n\r\nThe changes proposed would be useful during automation via Puppet (or other, similar tools) ... when you download the project/library with this type of schema, it can check if the valid versions of libraries/php are installed, and if not, install them prior to running composer install/update... \r\n\r\nI don't know if it'd be widely used, but I'm willing to write a puppet module and put up an example dev-env setup with this kind of schema... "}}