rector/bin/rector_bootstrap.php
2018-01-14 11:16:40 -02:00

19 lines
437 B
PHP

<?php declare(strict_types=1);
$possibleAutoloadPaths = [
// repository
__DIR__ . '/../vendor/autoload.php',
// composer require
__DIR__ . '/../../../../vendor/autoload.php',
// load from nearest vendor
getcwd() . '/vendor/autoload.php',
];
foreach ($possibleAutoloadPaths as $possibleAutoloadPath) {
if (is_file($possibleAutoloadPath)) {
require_once $possibleAutoloadPath;
break;
}
}