File tree Expand file tree Collapse file tree 4 files changed +18
-3
lines changed
src/Symfony/Component/Notifier/Bridge/Brevo Expand file tree Collapse file tree 4 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -43,13 +43,16 @@ public function webUrl(string $url): static
4343 /**
4444 * @return $this
4545 */
46- public function type (string $ type= " transactional " ): static
46+ public function type (string $ type = ' transactional ' ): static
4747 {
4848 $ this ->options ['type ' ] = $ type ;
4949
5050 return $ this ;
5151 }
5252
53+ /**
54+ * @return $this
55+ */
5356 public function tag (string $ tag ): static
5457 {
5558 $ this ->options ['tag ' ] = $ tag ;
Original file line number Diff line number Diff line change 1313
1414use Symfony \Component \Notifier \Exception \TransportException ;
1515use Symfony \Component \Notifier \Exception \UnsupportedMessageTypeException ;
16+ use Symfony \Component \Notifier \Exception \UnsupportedOptionsException ;
1617use Symfony \Component \Notifier \Message \MessageInterface ;
1718use Symfony \Component \Notifier \Message \SentMessage ;
1819use Symfony \Component \Notifier \Message \SmsMessage ;
@@ -54,7 +55,13 @@ protected function doSend(MessageInterface $message): SentMessage
5455 }
5556
5657 $ sender = $ message ->getFrom () ?: $ this ->sender ;
57- $ options = $ message ->getOptions ()?->toArray() ?? [];
58+
59+ if (($ options = $ message ->getOptions ()) && !$ options instanceof BrevoOptions) {
60+ throw new UnsupportedOptionsException (__CLASS__ , BrevoOptions::class, $ options );
61+ }
62+
63+ $ options = $ options ?->toArray() ?? [];
64+
5865 $ body = [
5966 'sender ' => $ sender ,
6067 'recipient ' => $ message ->getPhone (),
Original file line number Diff line number Diff line change 11CHANGELOG
22=========
33
4+ 7.3
5+ ---
6+
7+ * Add support for the ` tag ` , ` type ` , and ` webUrl ` options
8+
496.4
510---
611
Original file line number Diff line number Diff line change 1818 "require" : {
1919 "php" : " >=8.2" ,
2020 "symfony/http-client" : " ^6.4|^7.0" ,
21- "symfony/notifier" : " ^7.2 "
21+ "symfony/notifier" : " ^7.3 "
2222 },
2323 "require-dev" : {
2424 "symfony/event-dispatcher" : " ^5.4|^6.0|^7.0"
You can’t perform that action at this time.
0 commit comments