Skip to content

Commit 861f916

Browse files
authored
Merge pull request #7 from event-engine/feature/php8.4-remove-deprecations
Remove php8.4 deprecations
2 parents 4aea3e0 + 1df17b0 commit 861f916

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/CommandDispatchResult.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static function forCommandHandledByController(Message $dispatedCommand):
4343
return new self($dispatedCommand);
4444
}
4545

46-
private function __construct(Message $dispatchedCommand, string $effectedAggregateId = null, Message ...$recordedEvents)
46+
private function __construct(Message $dispatchedCommand, ?string $effectedAggregateId = null, Message ...$recordedEvents)
4747
{
4848
$this->dispatchedCommand = $dispatchedCommand;
4949
$this->effectedAggregateId = $effectedAggregateId;

src/Exception/MessageNotFound.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static function withMessageName(string $messageName): self
2020
return new self("Unknown message $messageName");
2121
}
2222

23-
public function __construct(string $message = "", Throwable $previous = null)
23+
public function __construct(string $message = "", ?Throwable $previous = null)
2424
{
2525
parent::__construct($message, 404, $previous);
2626
}

src/Exception/RuntimeException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
class RuntimeException extends \RuntimeException implements MessagingException
1717
{
18-
public function __construct(string $message = "", Throwable $previous = null)
18+
public function __construct(string $message = "", ?Throwable $previous = null)
1919
{
2020
parent::__construct($message, 500, $previous);
2121
}

src/MessageBag.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ final class MessageBag implements Message
7777
* @param \DateTimeImmutable|null $createdAt
7878
* @throws \Exception
7979
*/
80-
public function __construct(string $messageName, string $messageType, $message, $metadata = [], UuidInterface $messageId = null, \DateTimeImmutable $createdAt = null)
80+
public function __construct(string $messageName, string $messageType, $message, $metadata = [], ?UuidInterface $messageId = null, ?\DateTimeImmutable $createdAt = null)
8181
{
8282
if (! \in_array($messageType, self::MSG_TYPES)) {
8383
throw new \InvalidArgumentException('Message type should be one of ' . \implode(', ', self::MSG_TYPES) . ". Got $messageType");

0 commit comments

Comments
 (0)