Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c5010d5

Browse files
Merge branch '6.4' into 7.0
* 6.4: Fix implicitly-required parameters minor #53524 [Messenger] [AmazonSqs] Allow `async-aws/sqs` version 2 (smoench) Fix bad merge List CS fix in .git-blame-ignore-revs Fix implicitly-required parameters List CS fix in .git-blame-ignore-revs Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value [Messenger][AmazonSqs] Allow async-aws/sqs version 2
2 parents 471ebf8 + 2aaf83b commit c5010d5

38 files changed

+60
-60
lines changed

Application.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function setSignalsToDispatchEvent(int ...$signalsToDispatchEvent): void
137137
*
138138
* @throws \Exception When running fails. Bypass this when {@link setCatchExceptions()}.
139139
*/
140-
public function run(InputInterface $input = null, OutputInterface $output = null): int
140+
public function run(?InputInterface $input = null, ?OutputInterface $output = null): int
141141
{
142142
if (\function_exists('putenv')) {
143143
@putenv('LINES='.$this->terminal->getHeight());
@@ -762,7 +762,7 @@ public function find(string $name): Command
762762
*
763763
* @return Command[]
764764
*/
765-
public function all(string $namespace = null): array
765+
public function all(?string $namespace = null): array
766766
{
767767
$this->init();
768768

@@ -1130,7 +1130,7 @@ private function getAbbreviationSuggestions(array $abbrevs): string
11301130
*
11311131
* This method is not part of public API and should not be used directly.
11321132
*/
1133-
public function extractNamespace(string $name, int $limit = null): string
1133+
public function extractNamespace(string $name, ?int $limit = null): string
11341134
{
11351135
$parts = explode(':', $name, -1);
11361136

CI/GithubActionReporter.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static function isGithubActionEnvironment(): bool
5757
*
5858
* @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
5959
*/
60-
public function error(string $message, string $file = null, int $line = null, int $col = null): void
60+
public function error(string $message, ?string $file = null, ?int $line = null, ?int $col = null): void
6161
{
6262
$this->log('error', $message, $file, $line, $col);
6363
}
@@ -67,7 +67,7 @@ public function error(string $message, string $file = null, int $line = null, in
6767
*
6868
* @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message
6969
*/
70-
public function warning(string $message, string $file = null, int $line = null, int $col = null): void
70+
public function warning(string $message, ?string $file = null, ?int $line = null, ?int $col = null): void
7171
{
7272
$this->log('warning', $message, $file, $line, $col);
7373
}
@@ -77,12 +77,12 @@ public function warning(string $message, string $file = null, int $line = null,
7777
*
7878
* @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-debug-message
7979
*/
80-
public function debug(string $message, string $file = null, int $line = null, int $col = null): void
80+
public function debug(string $message, ?string $file = null, ?int $line = null, ?int $col = null): void
8181
{
8282
$this->log('debug', $message, $file, $line, $col);
8383
}
8484

85-
private function log(string $type, string $message, string $file = null, int $line = null, int $col = null): void
85+
private function log(string $type, string $message, ?string $file = null, ?int $line = null, ?int $col = null): void
8686
{
8787
// Some values must be encoded.
8888
$message = strtr($message, self::ESCAPED_DATA);

Command/Command.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public static function getDefaultDescription(): ?string
7777
*
7878
* @throws LogicException When the command name is empty
7979
*/
80-
public function __construct(string $name = null)
80+
public function __construct(?string $name = null)
8181
{
8282
$this->definition = new InputDefinition();
8383

@@ -413,7 +413,7 @@ public function getNativeDefinition(): InputDefinition
413413
*
414414
* @throws InvalidArgumentException When argument mode is not valid
415415
*/
416-
public function addArgument(string $name, int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static
416+
public function addArgument(string $name, ?int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static
417417
{
418418
$this->definition->addArgument(new InputArgument($name, $mode, $description, $default, $suggestedValues));
419419
$this->fullDefinition?->addArgument(new InputArgument($name, $mode, $description, $default, $suggestedValues));
@@ -433,7 +433,7 @@ public function addArgument(string $name, int $mode = null, string $description
433433
*
434434
* @throws InvalidArgumentException If option mode is invalid or incompatible
435435
*/
436-
public function addOption(string $name, string|array $shortcut = null, int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static
436+
public function addOption(string $name, string|array|null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static
437437
{
438438
$this->definition->addOption(new InputOption($name, $shortcut, $mode, $description, $default, $suggestedValues));
439439
$this->fullDefinition?->addOption(new InputOption($name, $shortcut, $mode, $description, $default, $suggestedValues));

Command/LazyCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function getNativeDefinition(): InputDefinition
113113
/**
114114
* @param array|\Closure(CompletionInput,CompletionSuggestions):list<string|Suggestion> $suggestedValues The values used for input completion
115115
*/
116-
public function addArgument(string $name, int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static
116+
public function addArgument(string $name, ?int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static
117117
{
118118
$this->getCommand()->addArgument($name, $mode, $description, $default, $suggestedValues);
119119

@@ -123,7 +123,7 @@ public function addArgument(string $name, int $mode = null, string $description
123123
/**
124124
* @param array|\Closure(CompletionInput,CompletionSuggestions):list<string|Suggestion> $suggestedValues The values used for input completion
125125
*/
126-
public function addOption(string $name, string|array $shortcut = null, int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static
126+
public function addOption(string $name, string|array|null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static
127127
{
128128
$this->getCommand()->addOption($name, $shortcut, $mode, $description, $default, $suggestedValues);
129129

Command/LockableTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ trait LockableTrait
2929
/**
3030
* Locks a command.
3131
*/
32-
private function lock(string $name = null, bool $blocking = false): bool
32+
private function lock(?string $name = null, bool $blocking = false): bool
3333
{
3434
if (!class_exists(SemaphoreStore::class)) {
3535
throw new LogicException('To enable the locking feature you must install the symfony/lock component. Try running "composer require symfony/lock".');

Command/TraceableCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public function ignoreValidationErrors(): void
134134
parent::ignoreValidationErrors();
135135
}
136136

137-
public function setApplication(Application $application = null): void
137+
public function setApplication(?Application $application = null): void
138138
{
139139
$this->command->setApplication($application);
140140
}
@@ -209,14 +209,14 @@ public function getNativeDefinition(): InputDefinition
209209
return $this->command->getNativeDefinition();
210210
}
211211

212-
public function addArgument(string $name, int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static
212+
public function addArgument(string $name, ?int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static
213213
{
214214
$this->command->addArgument($name, $mode, $description, $default, $suggestedValues);
215215

216216
return $this;
217217
}
218218

219-
public function addOption(string $name, string|array $shortcut = null, int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static
219+
public function addOption(string $name, string|array|null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static
220220
{
221221
$this->command->addOption($name, $shortcut, $mode, $description, $default, $suggestedValues);
222222

DataCollector/CommandDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*/
2828
final class CommandDataCollector extends DataCollector
2929
{
30-
public function collect(Request $request, Response $response, \Throwable $exception = null): void
30+
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
3131
{
3232
if (!$request instanceof CliRequest) {
3333
return;

Descriptor/ApplicationDescription.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class ApplicationDescription
3939
*/
4040
private array $aliases = [];
4141

42-
public function __construct(Application $application, string $namespace = null, bool $showHidden = false)
42+
public function __construct(Application $application, ?string $namespace = null, bool $showHidden = false)
4343
{
4444
$this->application = $application;
4545
$this->namespace = $namespace;

Descriptor/XmlDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function getCommandDocument(Command $command, bool $short = false): \DOMD
7979
return $dom;
8080
}
8181

82-
public function getApplicationDocument(Application $application, string $namespace = null, bool $short = false): \DOMDocument
82+
public function getApplicationDocument(Application $application, ?string $namespace = null, bool $short = false): \DOMDocument
8383
{
8484
$dom = new \DOMDocument('1.0', 'UTF-8');
8585
$dom->appendChild($rootXml = $dom->createElement('symfony'));

Event/ConsoleErrorEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ final class ConsoleErrorEvent extends ConsoleEvent
2525
private \Throwable $error;
2626
private int $exitCode;
2727

28-
public function __construct(InputInterface $input, OutputInterface $output, \Throwable $error, Command $command = null)
28+
public function __construct(InputInterface $input, OutputInterface $output, \Throwable $error, ?Command $command = null)
2929
{
3030
parent::__construct($command, $input, $output);
3131

0 commit comments

Comments
 (0)