{"action":"created","issue":{"url":"https://api.github.com/repos/phpbrew/phpbrew/issues/800","repository_url":"https://api.github.com/repos/phpbrew/phpbrew","labels_url":"https://api.github.com/repos/phpbrew/phpbrew/issues/800/labels{/name}","comments_url":"https://api.github.com/repos/phpbrew/phpbrew/issues/800/comments","events_url":"https://api.github.com/repos/phpbrew/phpbrew/issues/800/events","html_url":"https://github.com/phpbrew/phpbrew/issues/800","id":183102472,"number":800,"title":"phpbrew each doesn't allow the usage of Composer scripts","user":{"login":"raphaelstolt","id":48225,"avatar_url":"https://avatars.githubusercontent.com/u/48225?v=3","gravatar_id":"","url":"https://api.github.com/users/raphaelstolt","html_url":"https://github.com/raphaelstolt","followers_url":"https://api.github.com/users/raphaelstolt/followers","following_url":"https://api.github.com/users/raphaelstolt/following{/other_user}","gists_url":"https://api.github.com/users/raphaelstolt/gists{/gist_id}","starred_url":"https://api.github.com/users/raphaelstolt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raphaelstolt/subscriptions","organizations_url":"https://api.github.com/users/raphaelstolt/orgs","repos_url":"https://api.github.com/users/raphaelstolt/repos","events_url":"https://api.github.com/users/raphaelstolt/events{/privacy}","received_events_url":"https://api.github.com/users/raphaelstolt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-14T17:08:14Z","updated_at":"2016-10-24T23:25:41Z","closed_at":null,"body":"When trying to run a Composer script via `phpbrew each 'composer test'` from a local Git repository I get the following output.\r\n```\r\nRun composer test for php-[7.0.4, 5.6.19, 5.5.33, 5.4.45]. Proceed? [Yes/no]> Yes\r\nRunning `composer test` for php-7.0.4:\r\nDid you mean 'compile'? [Y/n] n\r\nCommand composer not found. available commands are: help, zsh, bash, meta, compile, archive, github:build-topics, app, init, known, install, list, use, switch, each, config, info, env, extension, variants, path, cd, download, clean, update, ctags, fpm, list-ini, self-update, remove, purge, off, switch-off\r\n\r\nPlease try the command below to see the details:\r\n\r\n\t/usr/local/bin/phpbrew help\r\n\r\n```\r\n\r\n### Expected Result\r\nThe Composer test script ran against the installed versions. Motivation behind this is to run tests or specs against all PHP versions managed by PHPBrew, kind of a local Travis CI.\r\n```\r\nRun composer test for php-[7.0.4, 5.6.19, 5.5.33, 5.4.45]. Proceed? [Yes/no]> Yes\r\nRunning `composer test` for php-7.0.4:\r\nOutput of composer test\r\n```\r\n\r\n### Platform\r\nOS X El Capitain\r\nphpbrew - 1.22.5\r\ncliframework core: 2.5.4\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/phpbrew/phpbrew/issues/comments/255894157","html_url":"https://github.com/phpbrew/phpbrew/issues/800#issuecomment-255894157","issue_url":"https://api.github.com/repos/phpbrew/phpbrew/issues/800","id":255894157,"user":{"login":"morozov","id":59683,"avatar_url":"https://avatars.githubusercontent.com/u/59683?v=3","gravatar_id":"","url":"https://api.github.com/users/morozov","html_url":"https://github.com/morozov","followers_url":"https://api.github.com/users/morozov/followers","following_url":"https://api.github.com/users/morozov/following{/other_user}","gists_url":"https://api.github.com/users/morozov/gists{/gist_id}","starred_url":"https://api.github.com/users/morozov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morozov/subscriptions","organizations_url":"https://api.github.com/users/morozov/orgs","repos_url":"https://api.github.com/users/morozov/repos","events_url":"https://api.github.com/users/morozov/events{/privacy}","received_events_url":"https://api.github.com/users/morozov/received_events","type":"User","site_admin":false},"created_at":"2016-10-24T23:25:41Z","updated_at":"2016-10-24T23:25:41Z","body":"@raphaelstolt it looks like according to [the original idea](https://github.com/phpbrew/phpbrew/issues/66#issuecomment-51802673) and the [implementation](https://github.com/phpbrew/phpbrew/blob/1.22.5/src/PhpBrew/Command/EachCommand.php#L58), `phpbrew each` runs a phpbrew command, not a shell one (I assume there's no phpbrew built-in `composer` command).\r\n\r\nAs a [workaround](https://github.com/phpbrew/phpbrew/issues/559#issuecomment-129909286), one may use something like:\r\n```bash\r\nphpbrew list | sed \"s/[ \\*]//g\" | while read version ; do\r\n    phpbrew use $version && php --version\r\ndone\r\n```"}}
{"actor":{"display_login":"morozov"}}