Fix autoloading and prioritize getting it as a dependency

This commit is contained in:
Stéphane Goetz 2016-07-29 08:55:08 +02:00 committed by GitHub
parent 06f0945cab
commit b9d99d1388

View File

@ -1,15 +1,15 @@
<?php
// Loaded as a dependency
if (file_exists(__DIR__ . '/../../../autoload.php')) {
return require_once __DIR__ . '/../../../autoload.php';
}
// Loaded in the project itself
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
return require_once __DIR__ . '/../vendor/autoload.php';
}
// Loaded as a dependency
if (file_exists(__DIR__ . '/../../../../autoload.php')) {
return require_once __DIR__ . '/../../../../autoload.php';
}
// Loaded in the project itself, when vendor isn't installed
if (file_exists(__DIR__ . '/../daux.phar')) {
define('PHAR_DIR', __DIR__ . '/..');