Fix autoloading and prioritize getting it as a dependency
Cette révision appartient à :
Parent
06f0945cab
révision
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__ . '/..');
|
||||||
|
|
Chargement…
Référencer dans un nouveau ticket