Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Configuration/RectorConfigBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -737,7 +738,6 @@ public function withComposerBased(
bool $drupal = false,
): self {
$setMap = [
SetGroup::DOCTRINE => $doctrine,
SetGroup::LARAVEL => $laravel,
SetGroup::DRUPAL => $drupal,
];
Expand All @@ -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) {
Expand Down
5 changes: 0 additions & 5 deletions src/Set/Enum/SetGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
12 changes: 6 additions & 6 deletions tests/Bin/RectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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\'."]}',
];
}
Expand All @@ -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()));
}
}
Loading