Skip to content

Commit 454fbd3

Browse files
committed
Updated Rector to commit 732ca2a054ea8ded3f79c04f90047f6841e730ac
rectorphp/rector-src@732ca2a [dx] help - omit explicit command name as no longer needed; remove verbosity option, use debug instead (#7620)
1 parent 531712b commit 454fbd3

File tree

4 files changed

+20
-16
lines changed

4 files changed

+20
-16
lines changed

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = 'dfa1141cf2b77ec1c65e7795599508f116e7b73b';
22+
public const PACKAGE_VERSION = '732ca2a054ea8ded3f79c04f90047f6841e730ac';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2025-11-10 02:03:44';
27+
public const RELEASE_DATE = '2025-11-11 10:36:29';
2828
/**
2929
* @var int
3030
*/

src/Console/Command/ProcessCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,19 +101,19 @@ protected function configure(): void
101101
$this->setHelp(<<<'EOF'
102102
The <info>%command.name%</info> command will run Rector main feature:
103103
104-
<info>%command.full_name%</info>
104+
<info>vendor/bin/rector</info>
105105
106106
To specify a folder or a file, you can run:
107107
108-
<info>%command.full_name% src/Controller</info>
108+
<info>vendor/bin/rector src/Controller</info>
109109
110110
You can also dry run to see the changes that Rector will make with the <comment>--dry-run</comment> option:
111111
112-
<info>%command.full_name% src/Controller --dry-run</info>
112+
<info>vendor/bin/rector src/Controller --dry-run</info>
113113
114114
It's also possible to get debug via the <comment>--debug</comment> option:
115115
116-
<info>%command.full_name% src/Controller --dry-run --debug</info>
116+
<info>vendor/bin/rector src/Controller --dry-run --debug</info>
117117
EOF
118118
);
119119
ProcessConfigureDecorator::decorate($this);

src/Console/ConsoleApplication.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,7 @@ public function __construct(array $commands)
3535
}
3636
public function doRun(InputInterface $input, OutputInterface $output): int
3737
{
38-
$isXdebugAllowed = $input->hasParameterOption('--xdebug');
39-
if (!$isXdebugAllowed) {
40-
$xdebugHandler = new XdebugHandler('rector');
41-
$xdebugHandler->setPersistent();
42-
$xdebugHandler->check();
43-
unset($xdebugHandler);
44-
}
38+
$this->enableXdebug($input);
4539
$shouldFollowByNewline = \false;
4640
// skip in this case, since generate content must be clear from meta-info
4741
if ($this->shouldPrintMetaInformation($input)) {
@@ -88,18 +82,28 @@ private function shouldPrintMetaInformation(InputInterface $input): bool
8882
private function removeUnusedOptions(InputDefinition $inputDefinition): void
8983
{
9084
$options = $inputDefinition->getOptions();
91-
unset($options['quiet'], $options['no-interaction']);
85+
unset($options['quiet'], $options['verbose'], $options['no-interaction']);
9286
$inputDefinition->setOptions($options);
9387
}
9488
private function addCustomOptions(InputDefinition $inputDefinition): void
9589
{
9690
$inputDefinition->addOption(new InputOption(Option::CONFIG, 'c', InputOption::VALUE_REQUIRED, 'Path to config file', $this->getDefaultConfigPath()));
97-
$inputDefinition->addOption(new InputOption(Option::DEBUG, null, InputOption::VALUE_NONE, 'Enable debug verbosity (-vvv)'));
91+
$inputDefinition->addOption(new InputOption(Option::DEBUG, null, InputOption::VALUE_NONE, 'Enable debug verbosity'));
9892
$inputDefinition->addOption(new InputOption(Option::XDEBUG, null, InputOption::VALUE_NONE, 'Allow running xdebug'));
9993
$inputDefinition->addOption(new InputOption(Option::CLEAR_CACHE, null, InputOption::VALUE_NONE, 'Clear cache'));
10094
}
10195
private function getDefaultConfigPath(): string
10296
{
10397
return getcwd() . '/rector.php';
10498
}
99+
private function enableXdebug(InputInterface $input): void
100+
{
101+
$isXdebugAllowed = $input->hasParameterOption('--xdebug');
102+
if (!$isXdebugAllowed) {
103+
$xdebugHandler = new XdebugHandler('rector');
104+
$xdebugHandler->setPersistent();
105+
$xdebugHandler->check();
106+
unset($xdebugHandler);
107+
}
108+
}
105109
}

src/DependencyInjection/RectorContainerFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
declare (strict_types=1);
44
namespace Rector\DependencyInjection;
55

6-
use Rector\Config\RectorConfig;
76
use Rector\Autoloading\BootstrapFilesIncluder;
87
use Rector\Caching\Detector\ChangedFilesDetector;
8+
use Rector\Config\RectorConfig;
99
use Rector\ValueObject\Bootstrap\BootstrapConfigs;
1010
final class RectorContainerFactory
1111
{

0 commit comments

Comments
 (0)