Skip to content

Commit 3832db1

Browse files
committed
Updated Rector to commit 9e92922ed4bc5b884745df738377e2bac1d022ef
rectorphp/rector-src@9e92922 [Console] Handle hidden "process" with --option without = on ConsoleApplication (#7022)
1 parent 558b94c commit 3832db1

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

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 = 'a37dcf119f2ce7422dc82b8f29f40a255ec43e3b';
22+
public const PACKAGE_VERSION = '9e92922ed4bc5b884745df738377e2bac1d022ef';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2025-06-26 23:34:29';
27+
public const RELEASE_DATE = '2025-06-26 18:38:43';
2828
/**
2929
* @var int
3030
*/

src/Console/ConsoleApplication.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,11 @@ public function doRun(InputInterface $input, OutputInterface $output) : int
5252
$output->write(\PHP_EOL);
5353
}
5454
$commandName = $input->getFirstArgument();
55-
// if paths exist
56-
if (\is_string($commandName) && \file_exists($commandName)) {
55+
// if paths exist or if the command name is not the first argument but with --option, eg:
56+
// bin/rector src
57+
// bin/rector --only "RemovePhpVersionIdCheckRector"
58+
// file_exists() can check directory and file
59+
if (\is_string($commandName) && (\file_exists($commandName) || isset($_SERVER['argv'][1]) && $commandName !== $_SERVER['argv'][1] && $input->hasParameterOption($_SERVER['argv'][1]))) {
5760
// prepend command name if implicit
5861
$privatesAccessor = new PrivatesAccessor();
5962
$tokens = $privatesAccessor->getPrivateProperty($input, 'tokens');

0 commit comments

Comments
 (0)