Skip to content

Commit 76faf84

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 192c716 + 02d63e7 commit 76faf84

38 files changed

+57
-57
lines changed

Attribute/Route.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Route
2929
* @param string[]|string $schemes
3030
*/
3131
public function __construct(
32-
string|array $path = null,
32+
string|array|null $path = null,
3333
private ?string $name = null,
3434
private array $requirements = [],
3535
private array $options = [],
@@ -39,10 +39,10 @@ public function __construct(
3939
array|string $schemes = [],
4040
private ?string $condition = null,
4141
private ?int $priority = null,
42-
string $locale = null,
43-
string $format = null,
44-
bool $utf8 = null,
45-
bool $stateless = null,
42+
?string $locale = null,
43+
?string $format = null,
44+
?bool $utf8 = null,
45+
?bool $stateless = null,
4646
private ?string $env = null
4747
) {
4848
if (\is_array($path)) {

CompiledRoute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class CompiledRoute implements \Serializable
3737
* @param array $hostVariables An array of host variables
3838
* @param array $variables An array of variables (variables defined in the path and in the host patterns)
3939
*/
40-
public function __construct(string $staticPrefix, string $regex, array $tokens, array $pathVariables, string $hostRegex = null, array $hostTokens = [], array $hostVariables = [], array $variables = [])
40+
public function __construct(string $staticPrefix, string $regex, array $tokens, array $pathVariables, ?string $hostRegex = null, array $hostTokens = [], array $hostVariables = [], array $variables = [])
4141
{
4242
$this->staticPrefix = $staticPrefix;
4343
$this->regex = $regex;

Exception/MethodNotAllowedException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MethodNotAllowedException extends \RuntimeException implements ExceptionIn
2525
/**
2626
* @param string[] $allowedMethods
2727
*/
28-
public function __construct(array $allowedMethods, string $message = '', int $code = 0, \Throwable $previous = null)
28+
public function __construct(array $allowedMethods, string $message = '', int $code = 0, ?\Throwable $previous = null)
2929
{
3030
$this->allowedMethods = array_map('strtoupper', $allowedMethods);
3131

Exception/MissingMandatoryParametersException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MissingMandatoryParametersException extends \InvalidArgumentException impl
2525
/**
2626
* @param string[] $missingParameters
2727
*/
28-
public function __construct(string $routeName = '', array $missingParameters = [], int $code = 0, \Throwable $previous = null)
28+
public function __construct(string $routeName = '', array $missingParameters = [], int $code = 0, ?\Throwable $previous = null)
2929
{
3030
$this->routeName = $routeName;
3131
$this->missingParameters = $missingParameters;

Generator/CompiledUrlGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class CompiledUrlGenerator extends UrlGenerator
2323
private array $compiledRoutes = [];
2424
private ?string $defaultLocale;
2525

26-
public function __construct(array $compiledRoutes, RequestContext $context, LoggerInterface $logger = null, string $defaultLocale = null)
26+
public function __construct(array $compiledRoutes, RequestContext $context, ?LoggerInterface $logger = null, ?string $defaultLocale = null)
2727
{
2828
$this->compiledRoutes = $compiledRoutes;
2929
$this->context = $context;

Generator/UrlGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt
7878
'%7C' => '|',
7979
];
8080

81-
public function __construct(RouteCollection $routes, RequestContext $context, LoggerInterface $logger = null, string $defaultLocale = null)
81+
public function __construct(RouteCollection $routes, RequestContext $context, ?LoggerInterface $logger = null, ?string $defaultLocale = null)
8282
{
8383
$this->routes = $routes;
8484
$this->context = $context;

Loader/AttributeClassLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function setRouteAnnotationClass(string $class): void
7171
/**
7272
* @throws \InvalidArgumentException When route can't be parsed
7373
*/
74-
public function load(mixed $class, string $type = null): RouteCollection
74+
public function load(mixed $class, ?string $type = null): RouteCollection
7575
{
7676
if (!class_exists($class)) {
7777
throw new \InvalidArgumentException(sprintf('Class "%s" does not exist.', $class));
@@ -215,7 +215,7 @@ protected function addRoute(RouteCollection $collection, object $annot, array $g
215215
}
216216
}
217217

218-
public function supports(mixed $resource, string $type = null): bool
218+
public function supports(mixed $resource, ?string $type = null): bool
219219
{
220220
return \is_string($resource) && preg_match('/^(?:\\\\?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)+$/', $resource) && (!$type || 'attribute' === $type);
221221
}

Loader/AttributeDirectoryLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class AttributeDirectoryLoader extends AttributeFileLoader
2626
/**
2727
* @throws \InvalidArgumentException When the directory does not exist or its routes cannot be parsed
2828
*/
29-
public function load(mixed $path, string $type = null): ?RouteCollection
29+
public function load(mixed $path, ?string $type = null): ?RouteCollection
3030
{
3131
if (!is_dir($dir = $this->locator->locate($path))) {
3232
return parent::supports($path, $type) ? parent::load($path, $type) : new RouteCollection();
@@ -61,7 +61,7 @@ public function load(mixed $path, string $type = null): ?RouteCollection
6161
return $collection;
6262
}
6363

64-
public function supports(mixed $resource, string $type = null): bool
64+
public function supports(mixed $resource, ?string $type = null): bool
6565
{
6666
if (!\is_string($resource)) {
6767
return false;

Loader/AttributeFileLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct(FileLocatorInterface $locator, AttributeClassLoader
4343
*
4444
* @throws \InvalidArgumentException When the file does not exist or its routes cannot be parsed
4545
*/
46-
public function load(mixed $file, string $type = null): ?RouteCollection
46+
public function load(mixed $file, ?string $type = null): ?RouteCollection
4747
{
4848
$path = $this->locator->locate($file);
4949

@@ -63,7 +63,7 @@ public function load(mixed $file, string $type = null): ?RouteCollection
6363
return $collection;
6464
}
6565

66-
public function supports(mixed $resource, string $type = null): bool
66+
public function supports(mixed $resource, ?string $type = null): bool
6767
{
6868
return \is_string($resource) && 'php' === pathinfo($resource, \PATHINFO_EXTENSION) && (!$type || 'attribute' === $type);
6969
}

Loader/ClosureLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ class ClosureLoader extends Loader
2626
/**
2727
* Loads a Closure.
2828
*/
29-
public function load(mixed $closure, string $type = null): RouteCollection
29+
public function load(mixed $closure, ?string $type = null): RouteCollection
3030
{
3131
return $closure($this->env);
3232
}
3333

34-
public function supports(mixed $resource, string $type = null): bool
34+
public function supports(mixed $resource, ?string $type = null): bool
3535
{
3636
return $resource instanceof \Closure && (!$type || 'closure' === $type);
3737
}

0 commit comments

Comments
 (0)