mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
36 lines
1012 B
PHP
36 lines
1012 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Rector\Core\Configuration\Option;
|
|
use Rector\Core\ValueObject\PhpVersion;
|
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
|
|
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
|
$parameters = $containerConfigurator->parameters();
|
|
|
|
$parameters->set(Option::PATHS, [
|
|
__DIR__ . '/src',
|
|
__DIR__ . '/tests',
|
|
__DIR__ . '/rules',
|
|
__DIR__ . '/utils',
|
|
__DIR__ . '/packages',
|
|
__DIR__ . '/bin/rector',
|
|
]);
|
|
|
|
$parameters->set(Option::SKIP, [
|
|
'/Source/',
|
|
'/*Source/',
|
|
'/Fixture/',
|
|
'/Expected/',
|
|
__DIR__ . '/packages/doctrine-annotation-generated/src/*',
|
|
__DIR__ . '/packages/rector-generator/templates/*',
|
|
'*.php.inc',
|
|
]);
|
|
|
|
$parameters->set(Option::AUTO_IMPORT_NAMES, true);
|
|
|
|
# so Rector code is still PHP 7.2 compatible
|
|
$parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_7_2);
|
|
};
|