Skip to content

Commit bb10f63

Browse files
Merge branch '6.3' into 6.4
* 6.3: 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
2 parents 3d323f2 + a2e6a33 commit bb10f63

16 files changed

+20
-20
lines changed

Authentication/AuthenticationTrustResolver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@
2121
*/
2222
class AuthenticationTrustResolver implements AuthenticationTrustResolverInterface
2323
{
24-
public function isAuthenticated(TokenInterface $token = null): bool
24+
public function isAuthenticated(?TokenInterface $token = null): bool
2525
{
2626
return $token && $token->getUser();
2727
}
2828

29-
public function isRememberMe(TokenInterface $token = null): bool
29+
public function isRememberMe(?TokenInterface $token = null): bool
3030
{
3131
return $token && $token instanceof RememberMeToken;
3232
}
3333

34-
public function isFullFledged(TokenInterface $token = null): bool
34+
public function isFullFledged(?TokenInterface $token = null): bool
3535
{
3636
return $this->isAuthenticated($token) && !$this->isRememberMe($token);
3737
}

Authentication/AuthenticationTrustResolverInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ interface AuthenticationTrustResolverInterface
2323
/**
2424
* Resolves whether the passed token implementation is authenticated.
2525
*/
26-
public function isAuthenticated(TokenInterface $token = null): bool;
26+
public function isAuthenticated(?TokenInterface $token = null): bool;
2727

2828
/**
2929
* Resolves whether the passed token implementation is authenticated
3030
* using remember-me capabilities.
3131
*/
32-
public function isRememberMe(TokenInterface $token = null): bool;
32+
public function isRememberMe(?TokenInterface $token = null): bool;
3333

3434
/**
3535
* Resolves whether the passed token implementation is fully authenticated.
3636
*/
37-
public function isFullFledged(TokenInterface $token = null): bool;
37+
public function isFullFledged(?TokenInterface $token = null): bool;
3838
}

Authentication/Token/Storage/TokenStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function getToken(): ?TokenInterface
4040
/**
4141
* @return void
4242
*/
43-
public function setToken(TokenInterface $token = null)
43+
public function setToken(?TokenInterface $token = null)
4444
{
4545
if (1 > \func_num_args()) {
4646
trigger_deprecation('symfony/security-core', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);

Authentication/Token/Storage/UsageTrackingTokenStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function getToken(): ?TokenInterface
4444
return $this->storage->getToken();
4545
}
4646

47-
public function setToken(TokenInterface $token = null): void
47+
public function setToken(?TokenInterface $token = null): void
4848
{
4949
$this->storage->setToken($token);
5050

Authentication/Token/SwitchUserToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class SwitchUserToken extends UsernamePasswordToken
2929
*
3030
* @throws \InvalidArgumentException
3131
*/
32-
public function __construct(UserInterface $user, string $firewallName, array $roles, TokenInterface $originalToken, string $originatedFromUri = null)
32+
public function __construct(UserInterface $user, string $firewallName, array $roles, TokenInterface $originalToken, ?string $originatedFromUri = null)
3333
{
3434
parent::__construct($user, $firewallName, $roles);
3535

Authorization/AccessDecisionManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ final class AccessDecisionManager implements AccessDecisionManagerInterface
4040
/**
4141
* @param iterable<mixed, VoterInterface> $voters An array or an iterator of VoterInterface instances
4242
*/
43-
public function __construct(iterable $voters = [], AccessDecisionStrategyInterface $strategy = null)
43+
public function __construct(iterable $voters = [], ?AccessDecisionStrategyInterface $strategy = null)
4444
{
4545
$this->voters = $voters;
4646
$this->strategy = $strategy ?? new AffirmativeStrategy();

Authorization/ExpressionLanguage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class_exists(ExpressionLanguageProvider::class);
2929
*/
3030
class ExpressionLanguage extends BaseExpressionLanguage
3131
{
32-
public function __construct(CacheItemPoolInterface $cache = null, array $providers = [])
32+
public function __construct(?CacheItemPoolInterface $cache = null, array $providers = [])
3333
{
3434
// prepend the default provider to let users override it easily
3535
array_unshift($providers, new ExpressionLanguageProvider());

Authorization/Voter/ExpressionVoter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ExpressionVoter implements CacheableVoterInterface
3131
private AuthorizationCheckerInterface $authChecker;
3232
private ?RoleHierarchyInterface $roleHierarchy;
3333

34-
public function __construct(ExpressionLanguage $expressionLanguage, AuthenticationTrustResolverInterface $trustResolver, AuthorizationCheckerInterface $authChecker, RoleHierarchyInterface $roleHierarchy = null)
34+
public function __construct(ExpressionLanguage $expressionLanguage, AuthenticationTrustResolverInterface $trustResolver, AuthorizationCheckerInterface $authChecker, ?RoleHierarchyInterface $roleHierarchy = null)
3535
{
3636
$this->expressionLanguage = $expressionLanguage;
3737
$this->trustResolver = $trustResolver;

Exception/AccessDeniedException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class AccessDeniedException extends RuntimeException
2424
private array $attributes = [];
2525
private mixed $subject = null;
2626

27-
public function __construct(string $message = 'Access Denied.', \Throwable $previous = null, int $code = 403)
27+
public function __construct(string $message = 'Access Denied.', ?\Throwable $previous = null, int $code = 403)
2828
{
2929
parent::__construct($message, $code, $previous);
3030
}

Exception/CustomUserMessageAccountStatusException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class CustomUserMessageAccountStatusException extends AccountStatusException
2626
private string $messageKey;
2727
private array $messageData = [];
2828

29-
public function __construct(string $message = '', array $messageData = [], int $code = 0, \Throwable $previous = null)
29+
public function __construct(string $message = '', array $messageData = [], int $code = 0, ?\Throwable $previous = null)
3030
{
3131
parent::__construct($message, $code, $previous);
3232

Exception/CustomUserMessageAuthenticationException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class CustomUserMessageAuthenticationException extends AuthenticationException
2525
private string $messageKey;
2626
private array $messageData = [];
2727

28-
public function __construct(string $message = '', array $messageData = [], int $code = 0, \Throwable $previous = null)
28+
public function __construct(string $message = '', array $messageData = [], int $code = 0, ?\Throwable $previous = null)
2929
{
3030
parent::__construct($message, $code, $previous);
3131

Exception/LogoutException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919
class LogoutException extends RuntimeException
2020
{
21-
public function __construct(string $message = 'Logout Exception', \Throwable $previous = null)
21+
public function __construct(string $message = 'Logout Exception', ?\Throwable $previous = null)
2222
{
2323
parent::__construct($message, 403, $previous);
2424
}

Exception/TooManyLoginAttemptsAuthenticationException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class TooManyLoginAttemptsAuthenticationException extends AuthenticationExceptio
2121
{
2222
private ?int $threshold;
2323

24-
public function __construct(int $threshold = null)
24+
public function __construct(?int $threshold = null)
2525
{
2626
$this->threshold = $threshold;
2727
}

Signature/SignatureHasher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class SignatureHasher
3636
* @param ExpiredSignatureStorage|null $expiredSignaturesStorage If provided, secures a sequence of hashes that are expired
3737
* @param int|null $maxUses Used together with $expiredSignatureStorage to allow a maximum usage of a hash
3838
*/
39-
public function __construct(PropertyAccessorInterface $propertyAccessor, array $signatureProperties, #[\SensitiveParameter] string $secret, ExpiredSignatureStorage $expiredSignaturesStorage = null, int $maxUses = null)
39+
public function __construct(PropertyAccessorInterface $propertyAccessor, array $signatureProperties, #[\SensitiveParameter] string $secret, ?ExpiredSignatureStorage $expiredSignaturesStorage = null, ?int $maxUses = null)
4040
{
4141
if (!$secret) {
4242
throw new InvalidArgumentException('A non-empty secret is required.');

Tests/Authentication/Token/AbstractTokenTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class ConcreteToken extends AbstractToken
9898
{
9999
private string $credentials = 'credentials_value';
100100

101-
public function __construct(array $roles = [], UserInterface $user = null)
101+
public function __construct(array $roles = [], ?UserInterface $user = null)
102102
{
103103
parent::__construct($roles);
104104

Validator/Constraints/UserPassword.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class UserPassword extends Constraint
2929
public $message = 'This value should be the user\'s current password.';
3030
public $service = 'security.validator.user_password';
3131

32-
public function __construct(array $options = null, string $message = null, string $service = null, array $groups = null, mixed $payload = null)
32+
public function __construct(?array $options = null, ?string $message = null, ?string $service = null, ?array $groups = null, mixed $payload = null)
3333
{
3434
parent::__construct($options, $groups, $payload);
3535

0 commit comments

Comments
 (0)