Skip to content

Commit c64bc21

Browse files
authored
Fix namespace of console Option attribute (#792)
1 parent dab3742 commit c64bc21

File tree

9 files changed

+10
-10
lines changed

9 files changed

+10
-10
lines changed

rules-tests/Symfony73/Rector/Class_/InvokableCommandInputAttributeRector/Fixture/name_with_hyphen.php.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ use Symfony\Component\Console\Output\OutputInterface;
4444
class NameWithHyphen
4545
{
4646
public function __invoke(#[\Symfony\Component\Console\Attribute\Argument(name: 'argument-with-hyphen', description: 'Argument description')]
47-
?string $argument_with_hyphen, #[\Symfony\Component\Console\Attribute\Command\Option]
47+
?string $argument_with_hyphen, #[\Symfony\Component\Console\Attribute\Option]
4848
$option_with_hyphen, OutputInterface $output): int
4949
{
5050
$argument = $argument_with_hyphen;

rules-tests/Symfony73/Rector/Class_/InvokableCommandInputAttributeRector/Fixture/some_command.php.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ use Symfony\Component\Console\Input\InputOption;
4646
final class SomeCommand
4747
{
4848
public function __invoke(#[\Symfony\Component\Console\Attribute\Argument(name: 'argument', description: 'Argument description')]
49-
string $argument, #[\Symfony\Component\Console\Attribute\Command\Option]
49+
string $argument, #[\Symfony\Component\Console\Attribute\Option]
5050
$option, OutputInterface $output): int
5151
{
5252
$someArgument = $argument;

rules-tests/Symfony73/Rector/Class_/InvokableCommandInputAttributeRector/Fixture/some_command_with_method_chaining.php.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ use Symfony\Component\Console\Input\InputOption;
4747
final class SomeCommandWithMethodChaining
4848
{
4949
public function __invoke(#[\Symfony\Component\Console\Attribute\Argument(name: 'argument', description: 'Argument description')]
50-
string $argument, #[\Symfony\Component\Console\Attribute\Command\Option]
50+
string $argument, #[\Symfony\Component\Console\Attribute\Option]
5151
$option, OutputInterface $output): int
5252
{
5353
$someArgument = $argument;

rules-tests/Symfony73/Rector/Class_/InvokableCommandInputAttributeRector/Fixture/some_command_with_set_help.php.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ final class SomeCommandWithSetHelp
5252
}
5353

5454
public function __invoke(#[\Symfony\Component\Console\Attribute\Argument(name: 'argument', description: 'Argument description')]
55-
string $argument, #[\Symfony\Component\Console\Attribute\Command\Option]
55+
string $argument, #[\Symfony\Component\Console\Attribute\Option]
5656
$option, OutputInterface $output): int
5757
{
5858
$someArgument = $argument;

rules-tests/Symfony73/Rector/Class_/InvokableCommandInputAttributeRector/Fixture/with_optional_argument.php.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ use Symfony\Component\Console\Input\InputOption;
4646
final class WithOptionalArgument
4747
{
4848
public function __invoke(#[\Symfony\Component\Console\Attribute\Argument(name: 'argument', description: 'Argument description')]
49-
?string $argument, #[\Symfony\Component\Console\Attribute\Command\Option]
49+
?string $argument, #[\Symfony\Component\Console\Attribute\Option]
5050
$option, OutputInterface $output): int
5151
{
5252
$someArgument = $argument;

rules-tests/Symfony73/Rector/Class_/InvokableCommandInputAttributeRector/Fixture/with_override.php.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ final class WithOverride
5050
public function __invoke(
5151
#[\Symfony\Component\Console\Attribute\Argument(name: 'argument', description: 'Argument description')]
5252
string $argument,
53-
#[\Symfony\Component\Console\Attribute\Command\Option]
53+
#[\Symfony\Component\Console\Attribute\Option]
5454
$option,
5555
OutputInterface $output
5656
): int

rules/Symfony73/Rector/Class_/InvokableCommandInputAttributeRector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ public function execute(InputInterface $input, OutputInterface $output)
8383
,
8484
<<<'CODE_SAMPLE'
8585
use Symfony\Component\Console\Command\Command;
86-
use Symfony\Component\Console\Command\Argument;
87-
use Symfony\Component\Console\Command\Option;
86+
use Symfony\Component\Console\Argument;
87+
use Symfony\Component\Console\Option;
8888
8989
final class SomeCommand
9090
{

src/Enum/SymfonyAttribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ final class SymfonyAttribute
1919
/**
2020
* @var string
2121
*/
22-
public const COMMAND_OPTION = 'Symfony\Component\Console\Attribute\Command\Option';
22+
public const COMMAND_OPTION = 'Symfony\Component\Console\Attribute\Option';
2323

2424
/**
2525
* @var string

tests/Set/Symfony73/Fixture/command_remove_config.php.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ TXT)]
5757
final class SomeCommand
5858
{
5959
public function __invoke(#[\Symfony\Component\Console\Attribute\Argument(name: 'argument', description: 'Argument description')]
60-
string $argument, #[\Symfony\Component\Console\Attribute\Command\Option]
60+
string $argument, #[\Symfony\Component\Console\Attribute\Option]
6161
$option, OutputInterface $output): int
6262
{
6363
$someArgument = $argument;

0 commit comments

Comments
 (0)