Removing PHPCI's custom autoloader in favour of Composer autoloader.
Closes #661
This commit is contained in:
parent
bd47766d63
commit
b8421898da
4 changed files with 786 additions and 236 deletions
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue