GitHub PullRequestReviewCommentEvent at 2014-01-28 20:42:05
Repository: phpseclib
Actor: bantu
Payload: {"comment":{"url":"https://api.github.com/repos/phpseclib/phpseclib/pulls/comments/9243546","id":9243546,"diff_hunk":"@@ -1,44 +1,12 @@\n <?php\n-/**\n- * Bootstrapping File for phpseclib Test Suite\n- *\n- * @license    http://www.opensource.org/licenses/mit-license.html  MIT License\n- */\n \n-date_default_timezone_set('UTC');\n+error_reporting(E_ALL | E_STRICT);\n \n-// Set up include path accordingly. This is especially required because some\n-// class files of phpseclib require() other dependencies.\n-set_include_path(implode(PATH_SEPARATOR, array(\n-\tdirname(__FILE__) . '/../phpseclib/',\n-\tdirname(__FILE__) . '/',\n-\tget_include_path(),\n-)));\n-\n-function phpseclib_is_includable($suffix)\n-{\n-\tforeach (explode(PATH_SEPARATOR, get_include_path()) as $prefix)\n-\t{\n-\t\t$ds = substr($prefix, -1) == DIRECTORY_SEPARATOR ? '' : DIRECTORY_SEPARATOR;\n-\t\t$file = $prefix . $ds . $suffix;\n-\n-\t\tif (file_exists($file))\n-\t\t{\n-\t\t\treturn true;\n-\t\t}\n-\t}\n-\n-\treturn false;\n-}\n-\n-function phpseclib_autoload($class)\n-{\n-\t$file = str_replace('_', '/', $class) . '.php';\n-\n-\tif (phpseclib_is_includable($file))\n-\t{\n-\t\trequire $file;\n-\t}\n+// Ensure that composer has installed all dependencies\n+if (!file_exists(dirname(__DIR__) . DIRECTORY_SEPARATOR . '/vendor/autoload.php')) {\n+    die(\"Dependencies must be installed using composer:\\n\\nphp composer.phar install --dev\\n\\n\"\n+        . \"See http://getcomposer.org for help with installing composer\\n\");\n }\n \n-spl_autoload_register('phpseclib_autoload');\n+// Include the Composer autoloader\n+$loader = include realpath(dirname(__FILE__) . '/../vendor/autoload.php');","path":"tests/bootstrap.php","position":51,"original_position":51,"commit_id":"9a44e7192692f2e53c5486e63f21db9f50d3d985","original_commit_id":"9a44e7192692f2e53c5486e63f21db9f50d3d985","user":{"login":"bantu","id":189375,"avatar_url":"https://gravatar.com/avatar/88483d87947219efecfc570465c753b2?d=https%3A%2F%2Fidenticons.github.com%2Fcdc48f189c0e2e8a870f3d54615a2f0d.png&r=x","gravatar_id":"88483d87947219efecfc570465c753b2","url":"https://api.github.com/users/bantu","html_url":"https://github.com/bantu","followers_url":"https://api.github.com/users/bantu/followers","following_url":"https://api.github.com/users/bantu/following{/other_user}","gists_url":"https://api.github.com/users/bantu/gists{/gist_id}","starred_url":"https://api.github.com/users/bantu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bantu/subscriptions","organizations_url":"https://api.github.com/users/bantu/orgs","repos_url":"https://api.github.com/users/bantu/repos","events_url":"https://api.github.com/users/bantu/events{/privacy}","received_events_url":"https://api.github.com/users/bantu/received_events","type":"User","site_admin":false},"body":"Make sure to include a newline at the end of all files.","created_at":"2014-01-28T20:42:05Z","updated_at":"2014-01-28T20:42:05Z","html_url":"https://github.com/phpseclib/phpseclib/pull/255#discussion_r9243546","pull_request_url":"https://api.github.com/repos/phpseclib/phpseclib/pulls/255","_links":{"self":{"href":"https://api.github.com/repos/phpseclib/phpseclib/pulls/comments/9243546"},"html":{"href":"https://github.com/phpseclib/phpseclib/pull/255#discussion_r9243546"},"pull_request":{"href":"https://api.github.com/repos/phpseclib/phpseclib/pulls/255"}}}}