Allow autoloading from vendor path

This commit is contained in:
Ingo Schommer 2017-10-02 22:14:35 +13:00
parent e884dc3b53
commit 31b213be7b

View File

@ -3,8 +3,13 @@
// Init composer autoload
call_user_func(function () {
$candidates = [
// module in vendor
__DIR__ . '/../../../../autoload.php',
// module in webroot
__DIR__ . '/../../vendor/autoload.php',
// module in webroot
__DIR__ . '/../../../vendor/autoload.php',
// module is webroot (usually during CI installs)
getcwd() . '/vendor/autoload.php',
];
foreach ($candidates as $candidate) {