2017-07-15 19:01:21 +02:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
|
|
|
/**
|
2017-08-04 08:20:18 +02:00
|
|
|
* This allows to load "vendor/autoload.php" both from
|
|
|
|
* "composer create-project ..." and "composer require" installation.
|
|
|
|
*/
|
2017-09-26 11:11:59 +02:00
|
|
|
$possibleAutoloadPaths = [
|
|
|
|
__DIR__ . '/../vendor/autoload.php', // composer require ... | repository
|
2017-09-26 11:49:22 +02:00
|
|
|
__DIR__ . '/../../../vendor/autoload.php', // composer create-project
|
2017-09-26 11:11:59 +02:00
|
|
|
];
|
2017-07-15 19:01:21 +02:00
|
|
|
|
|
|
|
foreach ($possibleAutoloadPaths as $possibleAutoloadPath) {
|
|
|
|
if (is_file($possibleAutoloadPath)) {
|
|
|
|
require_once $possibleAutoloadPath;
|
2017-09-09 00:58:29 +02:00
|
|
|
|
2017-07-15 19:01:21 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|