diff --git a/src/Configuration/RectorConfigBuilder.php b/src/Configuration/RectorConfigBuilder.php index c3d114e7687..bab164f6d86 100644 --- a/src/Configuration/RectorConfigBuilder.php +++ b/src/Configuration/RectorConfigBuilder.php @@ -37,6 +37,7 @@ use Rector\Set\ValueObject\SetList; use Rector\Symfony\Set\SymfonyInternalSetList; use Rector\Symfony\Set\SymfonySetList; +use Rector\Symfony\Set\TwigSetList; use Rector\ValueObject\Configuration\LevelOverflow; use Rector\ValueObject\PhpVersion; use Symfony\Component\Finder\Finder; @@ -737,7 +738,6 @@ public function withComposerBased( bool $drupal = false, ): self { $setMap = [ - SetGroup::DOCTRINE => $doctrine, SetGroup::LARAVEL => $laravel, SetGroup::DRUPAL => $drupal, ]; @@ -754,11 +754,11 @@ public function withComposerBased( } if ($doctrine) { - // $this->sets[] = DoctrineSetList::COMPOSER_BASED; + $this->sets[] = DoctrineSetList::COMPOSER_BASED; } if ($twig) { - // $this->sets[] = TwigSetList::COMPOSER_BASED; + $this->sets[] = TwigSetList::COMPOSER_BASED; } if ($symfony) { diff --git a/src/Set/Enum/SetGroup.php b/src/Set/Enum/SetGroup.php index 2863c045c69..7525b470c8f 100644 --- a/src/Set/Enum/SetGroup.php +++ b/src/Set/Enum/SetGroup.php @@ -13,11 +13,6 @@ final class SetGroup public const string PHP = 'php'; - /** - * Version-based set provider - */ - public const string DOCTRINE = 'doctrine'; - /** * Version-based set provider */ diff --git a/tests/Bin/RectorTest.php b/tests/Bin/RectorTest.php index 11f37ff522e..bd9e85de090 100644 --- a/tests/Bin/RectorTest.php +++ b/tests/Bin/RectorTest.php @@ -17,15 +17,15 @@ final class RectorTest extends TestCase public static function outputProvider(): Iterator { yield 'Version' => [ - 'command' => PHP_BINARY . ' bin/rector --version', - 'expectedOutput' => "Rector @package_version@" . PHP_EOL, + 'command' => PHP_BINARY . ' bin/rector --version', + 'expectedOutput' => 'Rector @package_version@' . PHP_EOL, ]; yield 'Exception with previous console output' => [ - 'command' => PHP_BINARY . ' bin/rector -c tests/Bin/config/incorrect-phpstan-files.php', - 'expectedOutput' => PHP_EOL . " [ERROR] Rector\\NodeTypeResolver\\DependencyInjection\\PHPStanServicesFactory " . PHP_EOL . PHP_EOL . " [ERROR] Unexpected item 'parameters › invalidParameters'. " . PHP_EOL . PHP_EOL, + 'command' => PHP_BINARY . ' bin/rector -c tests/Bin/config/incorrect-phpstan-files.php', + 'expectedOutput' => PHP_EOL . ' [ERROR] Rector\\NodeTypeResolver\\DependencyInjection\\PHPStanServicesFactory ' . PHP_EOL . PHP_EOL . " [ERROR] Unexpected item 'parameters › invalidParameters'. " . PHP_EOL . PHP_EOL, ]; yield 'Exception with previous console output in JSON format' => [ - 'command' => PHP_BINARY . ' bin/rector -c tests/Bin/config/incorrect-phpstan-files.php --output-format json', + 'command' => PHP_BINARY . ' bin/rector -c tests/Bin/config/incorrect-phpstan-files.php --output-format json', 'expectedOutput' => '{"fatal_errors":["Rector\\\\NodeTypeResolver\\\\DependencyInjection\\\\PHPStanServicesFactory","Unexpected item \'parameters › invalidParameters\'."]}', ]; } @@ -35,6 +35,6 @@ public function testConsoleOutput(string $command, string $expectedOutput): void { $process = Process::fromShellCommandline($command); $process->run(); - $this->assertSame($expectedOutput, preg_replace("/ +/", " ", $process->getOutput())); + $this->assertSame($expectedOutput, preg_replace('/ +/', ' ', $process->getOutput())); } }