Skip to content

Commit 23a9bc9

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 a7f9b6a + 1854d8a commit 23a9bc9

23 files changed

+31
-31
lines changed

DataCollector/MessageDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(MessageLoggerListener $logger)
2929
$this->events = $logger->getEvents();
3030
}
3131

32-
public function collect(Request $request, Response $response, \Throwable $exception = null): void
32+
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
3333
{
3434
$this->data['events'] = $this->events;
3535
}

Event/MessageEvents.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function getTransports(): array
4242
/**
4343
* @return MessageEvent[]
4444
*/
45-
public function getEvents(string $name = null): array
45+
public function getEvents(?string $name = null): array
4646
{
4747
if (null === $name) {
4848
return $this->events;
@@ -61,7 +61,7 @@ public function getEvents(string $name = null): array
6161
/**
6262
* @return RawMessage[]
6363
*/
64-
public function getMessages(string $name = null): array
64+
public function getMessages(?string $name = null): array
6565
{
6666
$events = $this->getEvents($name);
6767
$messages = [];

EventListener/EnvelopeListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class EnvelopeListener implements EventSubscriberInterface
3333
/**
3434
* @param array<Address|string> $recipients
3535
*/
36-
public function __construct(Address|string $sender = null, array $recipients = null)
36+
public function __construct(Address|string|null $sender = null, ?array $recipients = null)
3737
{
3838
if (null !== $sender) {
3939
$this->sender = Address::create($sender);

EventListener/MessageListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class MessageListener implements EventSubscriberInterface
4343
private array $headerRules = [];
4444
private ?BodyRendererInterface $renderer;
4545

46-
public function __construct(Headers $headers = null, BodyRendererInterface $renderer = null, array $headerRules = self::DEFAULT_RULES)
46+
public function __construct(?Headers $headers = null, ?BodyRendererInterface $renderer = null, array $headerRules = self::DEFAULT_RULES)
4747
{
4848
$this->headers = $headers;
4949
$this->renderer = $renderer;

Exception/HttpTransportException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class HttpTransportException extends TransportException
2020
{
2121
private ResponseInterface $response;
2222

23-
public function __construct(string $message, ResponseInterface $response, int $code = 0, \Throwable $previous = null)
23+
public function __construct(string $message, ResponseInterface $response, int $code = 0, ?\Throwable $previous = null)
2424
{
2525
parent::__construct($message, $code, $previous);
2626

Exception/UnsupportedSchemeException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class UnsupportedSchemeException extends LogicException
7878
],
7979
];
8080

81-
public function __construct(Dsn $dsn, string $name = null, array $supported = [])
81+
public function __construct(Dsn $dsn, ?string $name = null, array $supported = [])
8282
{
8383
$provider = $dsn->getScheme();
8484
if (false !== $pos = strpos($provider, '+')) {

Mailer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ final class Mailer implements MailerInterface
2929
private ?MessageBusInterface $bus;
3030
private ?EventDispatcherInterface $dispatcher;
3131

32-
public function __construct(TransportInterface $transport, MessageBusInterface $bus = null, EventDispatcherInterface $dispatcher = null)
32+
public function __construct(TransportInterface $transport, ?MessageBusInterface $bus = null, ?EventDispatcherInterface $dispatcher = null)
3333
{
3434
$this->transport = $transport;
3535
$this->bus = $bus;
3636
$this->dispatcher = $dispatcher;
3737
}
3838

39-
public function send(RawMessage $message, Envelope $envelope = null): void
39+
public function send(RawMessage $message, ?Envelope $envelope = null): void
4040
{
4141
if (null === $this->bus) {
4242
$this->transport->send($message, $envelope);

MailerInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ interface MailerInterface
2626
/**
2727
* @throws TransportExceptionInterface
2828
*/
29-
public function send(RawMessage $message, Envelope $envelope = null): void;
29+
public function send(RawMessage $message, ?Envelope $envelope = null): void;
3030
}

Messenger/SendEmailMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class SendEmailMessage
2222
private RawMessage $message;
2323
private ?Envelope $envelope;
2424

25-
public function __construct(RawMessage $message, Envelope $envelope = null)
25+
public function __construct(RawMessage $message, ?Envelope $envelope = null)
2626
{
2727
$this->message = $message;
2828
$this->envelope = $envelope;

Test/Constraint/EmailCount.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class EmailCount extends Constraint
2020
private ?string $transport;
2121
private bool $queued;
2222

23-
public function __construct(int $expectedValue, string $transport = null, bool $queued = false)
23+
public function __construct(int $expectedValue, ?string $transport = null, bool $queued = false)
2424
{
2525
$this->expectedValue = $expectedValue;
2626
$this->transport = $transport;

0 commit comments

Comments
 (0)