2020-07-18 20:26:57 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
use Rector\Core\Configuration\Option;
|
2020-11-26 23:09:21 +01:00
|
|
|
use Rector\Core\ValueObject\PhpVersion;
|
2020-07-18 20:26:57 +02:00
|
|
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
|
|
|
|
|
|
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
|
|
|
$parameters = $containerConfigurator->parameters();
|
2020-08-24 23:25:26 +02:00
|
|
|
|
2020-07-27 11:26:41 +02:00
|
|
|
$parameters->set(Option::PATHS, [
|
|
|
|
__DIR__ . '/src',
|
|
|
|
__DIR__ . '/tests',
|
|
|
|
__DIR__ . '/rules',
|
|
|
|
__DIR__ . '/utils',
|
|
|
|
__DIR__ . '/packages',
|
|
|
|
__DIR__ . '/bin/rector',
|
|
|
|
]);
|
|
|
|
|
2020-11-26 23:09:21 +01:00
|
|
|
$parameters->set(Option::SKIP, [
|
2020-07-27 11:26:41 +02:00
|
|
|
'/Source/',
|
|
|
|
'/*Source/',
|
|
|
|
'/Fixture/',
|
|
|
|
'/Expected/',
|
|
|
|
__DIR__ . '/packages/doctrine-annotation-generated/src/*',
|
2020-07-30 01:39:41 +02:00
|
|
|
__DIR__ . '/packages/rector-generator/templates/*',
|
2020-07-27 11:26:41 +02:00
|
|
|
'*.php.inc',
|
|
|
|
]);
|
2020-07-18 20:26:57 +02:00
|
|
|
|
2020-09-01 19:56:30 +02:00
|
|
|
$parameters->set(Option::AUTO_IMPORT_NAMES, true);
|
|
|
|
|
2020-07-18 20:26:57 +02:00
|
|
|
# so Rector code is still PHP 7.2 compatible
|
2020-11-26 23:09:21 +01:00
|
|
|
$parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_7_2);
|
2020-07-18 20:26:57 +02:00
|
|
|
};
|