Skip to content

Commit 18daf06

Browse files
Merge branch '5.4' into 6.3
* 5.4: 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 bc4a79b + 96c5ff3 commit 18daf06

36 files changed

+46
-46
lines changed

Channel/AbstractChannel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ abstract class AbstractChannel implements ChannelInterface
2323
protected $transport;
2424
protected $bus;
2525

26-
public function __construct(TransportInterface $transport = null, MessageBusInterface $bus = null)
26+
public function __construct(?TransportInterface $transport = null, ?MessageBusInterface $bus = null)
2727
{
2828
if (null === $transport && null === $bus) {
2929
throw new LogicException(sprintf('"%s" needs a Transport or a Bus but both cannot be "null".', static::class));

Channel/BrowserChannel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(RequestStack $stack, FlashMessageImportanceMapperInt
3232
$this->mapper = $mapper;
3333
}
3434

35-
public function notify(Notification $notification, RecipientInterface $recipient, string $transportName = null): void
35+
public function notify(Notification $notification, RecipientInterface $recipient, ?string $transportName = null): void
3636
{
3737
if (null === $request = $this->stack->getCurrentRequest()) {
3838
return;

Channel/ChannelInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*/
2020
interface ChannelInterface
2121
{
22-
public function notify(Notification $notification, RecipientInterface $recipient, string $transportName = null): void;
22+
public function notify(Notification $notification, RecipientInterface $recipient, ?string $transportName = null): void;
2323

2424
public function supports(Notification $notification, RecipientInterface $recipient): bool;
2525
}

Channel/ChatChannel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
class ChatChannel extends AbstractChannel
2323
{
24-
public function notify(Notification $notification, RecipientInterface $recipient, string $transportName = null): void
24+
public function notify(Notification $notification, RecipientInterface $recipient, ?string $transportName = null): void
2525
{
2626
$message = null;
2727
if ($notification instanceof ChatNotificationInterface) {

Channel/EmailChannel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class EmailChannel implements ChannelInterface
3434
private string|Address|null $from;
3535
private ?Envelope $envelope;
3636

37-
public function __construct(TransportInterface $transport = null, MessageBusInterface $bus = null, string $from = null, Envelope $envelope = null)
37+
public function __construct(?TransportInterface $transport = null, ?MessageBusInterface $bus = null, ?string $from = null, ?Envelope $envelope = null)
3838
{
3939
if (null === $transport && null === $bus) {
4040
throw new LogicException(sprintf('"%s" needs a Transport or a Bus but both cannot be "null".', static::class));
@@ -46,7 +46,7 @@ public function __construct(TransportInterface $transport = null, MessageBusInte
4646
$this->envelope = $envelope;
4747
}
4848

49-
public function notify(Notification $notification, RecipientInterface $recipient, string $transportName = null): void
49+
public function notify(Notification $notification, RecipientInterface $recipient, ?string $transportName = null): void
5050
{
5151
$message = null;
5252
if ($notification instanceof EmailNotificationInterface) {

Channel/PushChannel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
class PushChannel extends AbstractChannel
2323
{
24-
public function notify(Notification $notification, RecipientInterface $recipient, string $transportName = null): void
24+
public function notify(Notification $notification, RecipientInterface $recipient, ?string $transportName = null): void
2525
{
2626
$message = null;
2727
if ($notification instanceof PushNotificationInterface) {

Channel/SmsChannel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
class SmsChannel extends AbstractChannel
2424
{
25-
public function notify(Notification $notification, RecipientInterface $recipient, string $transportName = null): void
25+
public function notify(Notification $notification, RecipientInterface $recipient, ?string $transportName = null): void
2626
{
2727
$message = null;
2828
if ($notification instanceof SmsNotificationInterface) {

Chatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class Chatter implements ChatterInterface
2727
private ?MessageBusInterface $bus;
2828
private ?EventDispatcherInterface $dispatcher;
2929

30-
public function __construct(TransportInterface $transport, MessageBusInterface $bus = null, EventDispatcherInterface $dispatcher = null)
30+
public function __construct(TransportInterface $transport, ?MessageBusInterface $bus = null, ?EventDispatcherInterface $dispatcher = null)
3131
{
3232
$this->transport = $transport;
3333
$this->bus = $bus;

DataCollector/NotificationDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(NotificationLoggerListener $logger)
2929
$this->logger = $logger;
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->logger->getEvents();
3535
}

Event/NotificationEvents.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function getTransports(): array
3535
/**
3636
* @return MessageEvent[]
3737
*/
38-
public function getEvents(string $name = null): array
38+
public function getEvents(?string $name = null): array
3939
{
4040
if (null === $name) {
4141
return $this->events;
@@ -54,7 +54,7 @@ public function getEvents(string $name = null): array
5454
/**
5555
* @return MessageInterface[]
5656
*/
57-
public function getMessages(string $name = null): array
57+
public function getMessages(?string $name = null): array
5858
{
5959
$events = $this->getEvents($name);
6060
$messages = [];

0 commit comments

Comments
 (0)