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
7 changes: 1 addition & 6 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
- 'e2e/only-option-quote-single-bsdouble'
- 'e2e/only-option-quote-single-equalnone'
- 'e2e/parallel-custom-config'
- 'e2e/parallel-kaizen-applied-rules'
- 'e2e/parallel-reflection-resolver'
- 'e2e/parallel with space'
- 'e2e/print-new-node'
Expand Down Expand Up @@ -71,10 +70,6 @@ jobs:
working-directory: ${{ matrix.directory }}
if: ${{ matrix.directory == 'e2e/parallel-custom-config' }}

- run: php ../e2eTestRunner.php --kaizen 1
working-directory: ${{ matrix.directory }}
if: ${{ matrix.directory == 'e2e/parallel-kaizen-applied-rules' }}

- run: php ../e2eTestRunner.php
working-directory: ${{ matrix.directory }}
if: ${{ matrix.directory != 'e2e/parallel-custom-config' && matrix.directory != 'e2e/parallel-kaizen-applied-rules' }}
if: ${{ matrix.directory != 'e2e/parallel-custom-config' }}
35 changes: 18 additions & 17 deletions .github/workflows/e2e_command_with_option.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,24 @@ jobs:
php ../../bin/rector help

# with explicit "process" command
../../bin/rector process --kaizen 1 --dry-run
../../bin/rector process --kaizen=1 --dry-run
php ../../bin/rector process --kaizen 1 --dry-run
php ../../bin/rector process --kaizen=1 --dry-run
../../bin/rector process some_file.php --kaizen 1
../../bin/rector process some_file.php --kaizen=1
php ../../bin/rector process some_file.php --kaizen 1
php ../../bin/rector process some_file.php --kaizen=1
../../bin/rector process --output-format json --dry-run
../../bin/rector process --output-format=json --dry-run
php ../../bin/rector process --output-format json --dry-run
php ../../bin/rector process --output-format=json --dry-run

../../bin/rector process some_file.php --output-format json
../../bin/rector process some_file.php --output-format=json
php ../../bin/rector process some_file.php --output-format json
php ../../bin/rector process some_file.php --output-format=json

# with implicit process command
../../bin/rector --kaizen 1 --dry-run
../../bin/rector --kaizen=1 --dry-run
php ../../bin/rector --kaizen 1 --dry-run
php ../../bin/rector --kaizen=1 --dry-run

../../bin/rector some_file.php --kaizen 1
../../bin/rector some_file.php --kaizen=1
php ../../bin/rector some_file.php --kaizen 1
php ../../bin/rector some_file.php --kaizen=1
../../bin/rector --output-format json --dry-run
../../bin/rector --output-format=json --dry-run
php ../../bin/rector --output-format json --dry-run
php ../../bin/rector --output-format=json --dry-run

../../bin/rector some_file.php --output-format json
../../bin/rector some_file.php --output-format=json
php ../../bin/rector some_file.php --output-format json
php ../../bin/rector some_file.php --output-format=json

4 changes: 0 additions & 4 deletions e2e/e2eTestRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@
$e2eCommand .= ' -a ' . $argv[2];
}

if (isset($argv[1]) && $argv[1] === '--kaizen') {
$e2eCommand .= ' --kaizen ' . $argv[2];
}

$cliOptions = 'cli-options.txt';
if (file_exists($cliOptions)) {
$e2eCommand .= ' ' . trim((string) file_get_contents($cliOptions));
Expand Down
1 change: 0 additions & 1 deletion e2e/parallel-kaizen-applied-rules/.gitignore

This file was deleted.

5 changes: 0 additions & 5 deletions e2e/parallel-kaizen-applied-rules/composer.json

This file was deleted.

36 changes: 0 additions & 36 deletions e2e/parallel-kaizen-applied-rules/expected-output.diff

This file was deleted.

23 changes: 0 additions & 23 deletions e2e/parallel-kaizen-applied-rules/rector.php

This file was deleted.

10 changes: 0 additions & 10 deletions e2e/parallel-kaizen-applied-rules/src/File1.php

This file was deleted.

12 changes: 0 additions & 12 deletions e2e/parallel-kaizen-applied-rules/src/File2.php

This file was deleted.

10 changes: 0 additions & 10 deletions e2e/parallel-kaizen-applied-rules/src/File3.php

This file was deleted.

12 changes: 0 additions & 12 deletions e2e/parallel-kaizen-applied-rules/src/File4.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

declare(strict_types=1);

use Rector\TypeDeclaration\Rector\ClassMethod\AddParamStringTypeFromSprintfUseRector;
use Rector\Config\RectorConfig;
use Rector\TypeDeclaration\Rector\ClassMethod\AddParamStringTypeFromSprintfUseRector;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->rule(AddParamStringTypeFromSprintfUseRector::class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace Rector\TypeDeclaration\Rector\ClassMethod;

use PhpParser\Node\Identifier;
use PhpParser\Node;
use PhpParser\Node\Identifier;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Function_;
use Rector\Rector\AbstractRector;
Expand Down
6 changes: 0 additions & 6 deletions src/Application/ApplicationFileProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use PHPStan\Parser\ParserErrorsException;
use Rector\Application\Provider\CurrentFileProvider;
use Rector\Caching\Detector\ChangedFilesDetector;
use Rector\Configuration\KaizenStepper;
use Rector\Configuration\Option;
use Rector\Configuration\Parameter\SimpleParameterProvider;
use Rector\FileSystem\FilesFinder;
Expand Down Expand Up @@ -53,7 +52,6 @@ public function __construct(
private readonly FileProcessor $fileProcessor,
private readonly ArrayParametersMerger $arrayParametersMerger,
private readonly MissConfigurationReporter $missConfigurationReporter,
private readonly KaizenStepper $kaizenStepper
) {
}

Expand Down Expand Up @@ -120,10 +118,6 @@ public function processFiles(
?callable $preFileCallback = null,
?callable $postFileCallback = null
): ProcessResult {
if ($configuration->isKaizenEnabled()) {
$this->kaizenStepper->setStepCount($configuration->getKaizenStepCount());
}

/** @var SystemError[] $systemErrors */
$systemErrors = [];

Expand Down
48 changes: 0 additions & 48 deletions src/Caching/Detector/KaizenRulesDetector.php

This file was deleted.

5 changes: 0 additions & 5 deletions src/Caching/Enum/CacheKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,4 @@ final class CacheKey
* @var string
*/
public const FILE_HASH_KEY = 'file_hash';

/**
* @var string
*/
public const KAIZEN_RULES = 'kaizen_rules';
}
9 changes: 0 additions & 9 deletions src/Configuration/ConfigurationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Rector\ValueObject\Configuration;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use Webmozart\Assert\Assert;

/**
* @see \Rector\Tests\Configuration\ConfigurationFactoryTest
Expand Down Expand Up @@ -58,13 +57,6 @@ public function createFromInput(InputInterface $input): Configuration
$shouldClearCache = (bool) $input->getOption(Option::CLEAR_CACHE);

$outputFormat = (string) $input->getOption(Option::OUTPUT_FORMAT);

$kaizenStepCount = $input->getOption(Option::KAIZEN);
if ($kaizenStepCount !== null) {
$kaizenStepCount = (int) $kaizenStepCount;
Assert::positiveInteger($kaizenStepCount, 'Change "--kaizen" value to a positive integer');
}

$showProgressBar = $this->shouldShowProgressBar($input, $outputFormat);

$showDiffs = $this->shouldShowDiffs($input);
Expand Down Expand Up @@ -114,7 +106,6 @@ public function createFromInput(InputInterface $input): Configuration
$onlyRule,
$onlySuffix,
$levelOverflows,
$kaizenStepCount
);
}

Expand Down
55 changes: 0 additions & 55 deletions src/Configuration/KaizenStepper.php

This file was deleted.

9 changes: 0 additions & 9 deletions src/Configuration/Option.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,4 @@ final class Option
* @internal to allow process file without extension if explicitly registered
*/
public const FILES_WITHOUT_EXTENSION = 'files_without_extension';

/**
* @experimental
*
* Limit changes to first X applied rules
*
* @var string
*/
public const KAIZEN = 'kaizen';
}
Loading