Fix autoloading and prioritize getting it as a dependency
This commit is contained in:
parent
06f0945cab
commit
b9d99d1388
@ -1,15 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
// Loaded as a dependency
|
||||||
|
if (file_exists(__DIR__ . '/../../../autoload.php')) {
|
||||||
|
return require_once __DIR__ . '/../../../autoload.php';
|
||||||
|
}
|
||||||
|
|
||||||
// Loaded in the project itself
|
// Loaded in the project itself
|
||||||
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
|
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
|
||||||
return require_once __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
|
// Loaded in the project itself, when vendor isn't installed
|
||||||
if (file_exists(__DIR__ . '/../daux.phar')) {
|
if (file_exists(__DIR__ . '/../daux.phar')) {
|
||||||
define('PHAR_DIR', __DIR__ . '/..');
|
define('PHAR_DIR', __DIR__ . '/..');
|
||||||
|
Loading…
Reference in New Issue
Block a user