{"action":"created","issue":{"url":"https://api.github.com/repos/phpspec/phpspec/issues/668","labels_url":"https://api.github.com/repos/phpspec/phpspec/issues/668/labels{/name}","comments_url":"https://api.github.com/repos/phpspec/phpspec/issues/668/comments","events_url":"https://api.github.com/repos/phpspec/phpspec/issues/668/events","html_url":"https://github.com/phpspec/phpspec/issues/668","id":64634435,"number":668,"title":"Second autoload check not working in Laravel","user":{"login":"RyanHavoc","id":824169,"avatar_url":"https://avatars.githubusercontent.com/u/824169?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanHavoc","html_url":"https://github.com/RyanHavoc","followers_url":"https://api.github.com/users/RyanHavoc/followers","following_url":"https://api.github.com/users/RyanHavoc/following{/other_user}","gists_url":"https://api.github.com/users/RyanHavoc/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanHavoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanHavoc/subscriptions","organizations_url":"https://api.github.com/users/RyanHavoc/orgs","repos_url":"https://api.github.com/users/RyanHavoc/repos","events_url":"https://api.github.com/users/RyanHavoc/events{/privacy}","received_events_url":"https://api.github.com/users/RyanHavoc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-03-26T21:08:44Z","updated_at":"2015-03-26T21:31:22Z","closed_at":null,"body":"Hi,\r\n\r\nSo I trying to use phpspec with Laravel (also I have laravel sat in a sub-folder). I get this:\r\n\r\n    $ phpspec\r\n    You must set up the project dependencies, run the following commands:\r\n    curl -s http://getcomposer.org/installer | php\r\n    php composer.phar install\r\n\r\nIf I edit vendor/bin/phpspec to this:\r\n\r\n    #!/usr/bin/env php\r\n    <?php\r\n\r\n    define('PHPSPEC_VERSION', '2.1.1');\r\n\r\n\r\n    if (is_file($autoload = getcwd() . '/vendor/autoload.php')) {\r\n        require $autoload;\r\n    } elseif (is_file($autoload = getcwd() . '/../../autoload.php')) {\r\n        require $autoload;\r\n    }\r\n\r\n    //if (is_file($autoload = __DIR__ . '/../vendor/autoload.php')) {\r\n    //    require($autoload);\r\n    //} elseif (is_file($autoload = __DIR__ . '/../../../autoload.php')) {\r\n    //    require($autoload);\r\n    //} else {\r\n    //    fwrite(STDERR,\r\n    //        'You must set up the project dependencies, run the following commands:' . PHP_EOL .\r\n    //        'curl -s http://getcomposer.org/installer | php' . PHP_EOL .\r\n    //        'php composer.phar install' . PHP_EOL\r\n    //    );\r\n    //    exit(1);\r\n    //}\r\n\r\n    $app = new PhpSpec\\Console\\Application(PHPSPEC_VERSION);\r\n    $app->run();\r\n\r\nIt works as expected. I assume because phpspec is included in the Laravel autoload.php file.\r\n\r\nHow do I get it to work with the second if uncommented?\r\n"},"comment":{"url":"https://api.github.com/repos/phpspec/phpspec/issues/comments/86726730","html_url":"https://github.com/phpspec/phpspec/issues/668#issuecomment-86726730","issue_url":"https://api.github.com/repos/phpspec/phpspec/issues/668","id":86726730,"user":{"login":"ciaranmcnulty","id":237866,"avatar_url":"https://avatars.githubusercontent.com/u/237866?v=3","gravatar_id":"","url":"https://api.github.com/users/ciaranmcnulty","html_url":"https://github.com/ciaranmcnulty","followers_url":"https://api.github.com/users/ciaranmcnulty/followers","following_url":"https://api.github.com/users/ciaranmcnulty/following{/other_user}","gists_url":"https://api.github.com/users/ciaranmcnulty/gists{/gist_id}","starred_url":"https://api.github.com/users/ciaranmcnulty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciaranmcnulty/subscriptions","organizations_url":"https://api.github.com/users/ciaranmcnulty/orgs","repos_url":"https://api.github.com/users/ciaranmcnulty/repos","events_url":"https://api.github.com/users/ciaranmcnulty/events{/privacy}","received_events_url":"https://api.github.com/users/ciaranmcnulty/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T21:31:22Z","updated_at":"2015-03-26T21:31:22Z","body":"Make a new one please"}}