mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-22 00:12:29 +02:00
autoload config fixes
This commit is contained in:
parent
2ab86cb9fb
commit
91a2b0ed77
@ -4,19 +4,13 @@
|
||||
$isDevRepository = file_exists(__DIR__ . '/../README.md') || \file_exists(__DIR__ . '/../../build');
|
||||
|
||||
// load the project with Prefixed Rector
|
||||
if (defined('RECTOR_PREFIXED') && ! $isDevRepository) {
|
||||
if (! $isDevRepository) {
|
||||
$projectAutoload = getcwd() . '/vendor/autoload.php';
|
||||
if (is_file($projectAutoload)) {
|
||||
require_once $projectAutoload;
|
||||
}
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
imports:
|
||||
- { resource: '%vendor%/symplify/better-phpdoc-parser/src/config/services.yml' }
|
||||
# to cover prefixed rector and projects autoload
|
||||
- { resource: '%vendor%/symplify/better-phpdoc-parser/src/config/services.yml', ignore_errors: true }
|
||||
- { resource: '%cwd%/symplify/better-phpdoc-parser/src/config/services.yml', ignore_errors: true }
|
||||
|
||||
services:
|
||||
Rector\BetterPhpDocParser\:
|
||||
|
Loading…
x
Reference in New Issue
Block a user