mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-20 07:22:43 +02:00
bootstrap: require autoload.php of the project
This commit is contained in:
parent
e74e11beb4
commit
cc21d0337e
@ -11,6 +11,16 @@ if (defined('RECTOR_PREFIXED') && ! $isDevRepository) {
|
||||
}
|
||||
}
|
||||
|
||||
// autoload project even from non-root use
|
||||
$autoloadInWorkingDirectory = getcwd() . '/vendor/autoload.php';
|
||||
if (is_file($autoloadInWorkingDirectory)) {
|
||||
require_once $autoloadInWorkingDirectory;
|
||||
}
|
||||
|
||||
if (class_exists('Rector\DependencyInjection\RectorKernel')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$possibleAutoloadPaths = [
|
||||
// dev repository or prefixed rector
|
||||
__DIR__ . '/../vendor/autoload.php',
|
||||
|
Loading…
x
Reference in New Issue
Block a user