Removing PHPCI's custom autoloader in favour of Composer autoloader.

Closes #661
This commit is contained in:
Marco Vito Moscaritolo 2014-11-19 22:31:00 +01:00 committed by Dan Cryer
commit b8421898da
4 changed files with 786 additions and 236 deletions

View file

@ -16,23 +16,6 @@ if (empty($timezone)) {
date_default_timezone_set('UTC');
}
// Set up a basic autoloader for PHPCI:
$autoload = function ($class) {
$file = str_replace(array('\\', '_'), '/', $class);
$file .= '.php';
if (substr($file, 0, 1) == '/') {
$file = substr($file, 1);
}
if (is_file(dirname(__FILE__) . '/' . $file)) {
include(dirname(__FILE__) . '/' . $file);
return;
}
};
spl_autoload_register($autoload, true, true);
// If the PHPCI config file is not where we expect it, try looking in
// env for an alternative config path.
$configFile = dirname(__FILE__) . '/PHPCI/config.yml';