fix class name miss match caused by robotloader

This commit is contained in:
Tomas Votruba 2018-12-08 16:12:24 +01:00
parent 5df19a36e3
commit c088e62359

View File

@ -7,6 +7,7 @@ use Nette\Utils\Strings;
use Rector\Console\Shell; use Rector\Console\Shell;
use Rector\ConsoleDiffer\MarkdownDifferAndFormatter; use Rector\ConsoleDiffer\MarkdownDifferAndFormatter;
use Rector\Contract\Rector\RectorInterface; use Rector\Contract\Rector\RectorInterface;
use Rector\Error\ExceptionCorrector;
use Rector\Exception\ShouldNotHappenException; use Rector\Exception\ShouldNotHappenException;
use Rector\RectorDefinition\ConfiguredCodeSample; use Rector\RectorDefinition\ConfiguredCodeSample;
use ReflectionClass; use ReflectionClass;
@ -169,6 +170,11 @@ final class GenerateRectorOverviewCommand extends Command
$rectors = []; $rectors = [];
foreach (array_keys($robotLoader->getIndexedClasses()) as $class) { foreach (array_keys($robotLoader->getIndexedClasses()) as $class) {
// special case, because robot loader is case insensitive
if ($class === ExceptionCorrector::class) {
continue;
}
$reflectionClass = new ReflectionClass($class); $reflectionClass = new ReflectionClass($class);
if ($reflectionClass->isAbstract()) { if ($reflectionClass->isAbstract()) {
continue; continue;