{"action":"created","issue":{"url":"https://api.github.com/repos/projectkudu/KuduScript/issues/68","repository_url":"https://api.github.com/repos/projectkudu/KuduScript","labels_url":"https://api.github.com/repos/projectkudu/KuduScript/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/projectkudu/KuduScript/issues/68/comments","events_url":"https://api.github.com/repos/projectkudu/KuduScript/issues/68/events","html_url":"https://github.com/projectkudu/KuduScript/issues/68","id":214389823,"number":68,"title":"Add better support for PHP applications","user":{"login":"hajekj","id":8337913,"avatar_url":"https://avatars0.githubusercontent.com/u/8337913?v=3","gravatar_id":"","url":"https://api.github.com/users/hajekj","html_url":"https://github.com/hajekj","followers_url":"https://api.github.com/users/hajekj/followers","following_url":"https://api.github.com/users/hajekj/following{/other_user}","gists_url":"https://api.github.com/users/hajekj/gists{/gist_id}","starred_url":"https://api.github.com/users/hajekj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hajekj/subscriptions","organizations_url":"https://api.github.com/users/hajekj/orgs","repos_url":"https://api.github.com/users/hajekj/repos","events_url":"https://api.github.com/users/hajekj/events{/privacy}","received_events_url":"https://api.github.com/users/hajekj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-03-15T13:32:48Z","updated_at":"2017-04-18T19:04:33Z","closed_at":null,"body":"It would be great if we could produce correct build script for PHP applications (with Composer) so builds would work out of box for PHP applications - I am well aware of [Composer site extension](http://www.siteextensions.net/packages/ComposerExtension/), however I think that since we have support for Node.js with NPM packages, this should be supproted at the same level.\r\n\r\n```batch\r\n:: 1. Composer.phar\r\nIF EXIST \"%DEPLOYMENT_TARGET%\\composer.json\" (\r\n  cd %DEPLOYMENT_TARGET%\r\n\r\n  IF NOT EXIST \"%DEPLOYMENT_TARGET%\\composer.phar\" (\r\n    call curl -s http://getcomposer.org/installer | php > nul\r\n    IF !ERRORLEVEL! NEQ 0 goto error\r\n  )\r\n\r\n  call php composer.phar install\r\n  IF !ERRORLEVEL! NEQ 0 goto error\r\n)\r\n```\r\n\r\nAbove, I have added a simple example which demonstrates the installation of Composer from within the build script. The best solution would be to include Composer natively to Azure App Service. I think this would be a great step forward and I can try to make a pull request which would resolve this if the maintainers agree with this suggestion."},"comment":{"url":"https://api.github.com/repos/projectkudu/KuduScript/issues/comments/294948035","html_url":"https://github.com/projectkudu/KuduScript/issues/68#issuecomment-294948035","issue_url":"https://api.github.com/repos/projectkudu/KuduScript/issues/68","id":294948035,"user":{"login":"Benjiiim","id":5741449,"avatar_url":"https://avatars1.githubusercontent.com/u/5741449?v=3","gravatar_id":"","url":"https://api.github.com/users/Benjiiim","html_url":"https://github.com/Benjiiim","followers_url":"https://api.github.com/users/Benjiiim/followers","following_url":"https://api.github.com/users/Benjiiim/following{/other_user}","gists_url":"https://api.github.com/users/Benjiiim/gists{/gist_id}","starred_url":"https://api.github.com/users/Benjiiim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Benjiiim/subscriptions","organizations_url":"https://api.github.com/users/Benjiiim/orgs","repos_url":"https://api.github.com/users/Benjiiim/repos","events_url":"https://api.github.com/users/Benjiiim/events{/privacy}","received_events_url":"https://api.github.com/users/Benjiiim/received_events","type":"User","site_admin":false},"created_at":"2017-04-18T19:04:33Z","updated_at":"2017-04-18T19:04:33Z","body":"Indeed."}}
{"actor":{"display_login":"Benjiiim"}}