mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-23 11:14:38 +01:00
19 lines
518 B
PHP
19 lines
518 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;
|
|
}
|
|
}
|