Skip to content

Commit 1de6a7c

Browse files
raphael-geffroyfabpot
authored andcommitted
[Notifier] unsupported options exception
1 parent 790a1d4 commit 1de6a7c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

MercureTransport.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
use Symfony\Component\Mercure\Exception\RuntimeException as MercureRuntimeException;
1616
use Symfony\Component\Mercure\HubInterface;
1717
use Symfony\Component\Mercure\Update;
18-
use Symfony\Component\Notifier\Exception\LogicException;
1918
use Symfony\Component\Notifier\Exception\RuntimeException;
2019
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
20+
use Symfony\Component\Notifier\Exception\UnsupportedOptionsException;
2121
use Symfony\Component\Notifier\Message\ChatMessage;
2222
use Symfony\Component\Notifier\Message\MessageInterface;
2323
use Symfony\Component\Notifier\Message\SentMessage;
@@ -67,7 +67,7 @@ protected function doSend(MessageInterface $message): SentMessage
6767
}
6868

6969
if (($options = $message->getOptions()) && !$options instanceof MercureOptions) {
70-
throw new LogicException(\sprintf('The "%s" transport only supports instances of "%s" for options.', __CLASS__, MercureOptions::class));
70+
throw new UnsupportedOptionsException(__CLASS__, MercureOptions::class, $options);
7171
}
7272

7373
$options ??= new MercureOptions($this->topics);

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"require": {
1919
"php": ">=8.2",
2020
"symfony/mercure": "^0.5.2|^0.6",
21-
"symfony/notifier": "^7.2",
21+
"symfony/notifier": "^7.3",
2222
"symfony/service-contracts": "^2.5|^3"
2323
},
2424
"autoload": {

0 commit comments

Comments
 (0)