mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-22 10:43:35 +01:00
ebd4c3fee6
[Renaming] Skip renaming method call on RenameMethodRector when both old and new exists, which implements interface as config (#2276)
16 lines
796 B
PHP
16 lines
796 B
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace RectorPrefix20220511;
|
|
|
|
use Rector\Config\RectorConfig;
|
|
use Rector\PSR4\Composer\PSR4NamespaceMatcher;
|
|
use Rector\PSR4\Contract\PSR4AutoloadNamespaceMatcherInterface;
|
|
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
|
$services = $rectorConfig->services();
|
|
$services->defaults()->public()->autowire()->autoconfigure();
|
|
// psr-4
|
|
$services->alias(\Rector\PSR4\Contract\PSR4AutoloadNamespaceMatcherInterface::class, \Rector\PSR4\Composer\PSR4NamespaceMatcher::class);
|
|
$services->load('Rector\\', __DIR__ . '/../rules')->exclude([__DIR__ . '/../rules/*/ValueObject/*', __DIR__ . '/../rules/*/Rector/*', __DIR__ . '/../rules/*/Contract/*', __DIR__ . '/../rules/*/Exception/*', __DIR__ . '/../rules/*/Enum/*']);
|
|
};
|