rector/bin/bootstrap.php
2017-09-27 17:02:54 +02:00

19 lines
517 B
PHP

<?php declare(strict_types=1);
/**
* This allows to load "vendor/autoload.php" both from
* "composer create-project ..." and "composer require" installation.
*/
$possibleAutoloadPaths = [
__DIR__ . '/../vendor/autoload.php', // composer require ... | repository
__DIR__ . '/../../../vendor/autoload.php' // composer create-project
];
foreach ($possibleAutoloadPaths as $possibleAutoloadPath) {
if (is_file($possibleAutoloadPath)) {
require_once $possibleAutoloadPath;
break;
}
}