diff --git a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/MicrosoftTeamsOptions.php b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/MicrosoftTeamsOptions.php index 5f076dafc628..14b63261e9bd 100644 --- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/MicrosoftTeamsOptions.php +++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/MicrosoftTeamsOptions.php @@ -81,8 +81,8 @@ public function getRecipientId(): ?string */ public function recipient(string $path): self { - if (!preg_match('/^\/webhook\//', $path)) { - throw new InvalidArgumentException(sprintf('"%s" require recipient id format to be "/webhook/{uuid}@{uuid}/IncomingWebhook/{id}/{uuid}", "%s" given.', __CLASS__, $path)); + if (!preg_match('/^\/webhookb2\//', $path)) { + throw new InvalidArgumentException(sprintf('"%s" require recipient id format to be "/webhookb2/{uuid}@{uuid}/IncomingWebhook/{id}/{uuid}", "%s" given.', __CLASS__, $path)); } $this->options['recipient_id'] = $path; diff --git a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/README.md b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/README.md index 94620e541afa..5fab523c50e0 100644 --- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/README.md +++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/README.md @@ -12,7 +12,7 @@ MICROSOFT_TEAMS_DSN=microsoftteams://default/PATH ``` where: - - `PATH` has the following format: `webhook/{uuid}@{uuid}/IncomingWebhook/{id}/{uuid}` + - `PATH` has the following format: `webhookb2/{uuid}@{uuid}/IncomingWebhook/{id}/{uuid}` Resources --------- diff --git a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/MicrosoftTeamsOptionsTest.php b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/MicrosoftTeamsOptionsTest.php index 3c766ffdb459..1cc7ea04f8b0 100644 --- a/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/MicrosoftTeamsOptionsTest.php +++ b/src/Symfony/Component/Notifier/Bridge/MicrosoftTeams/Tests/MicrosoftTeamsOptionsTest.php @@ -30,7 +30,7 @@ public function testFromNotification() public function testGetRecipientIdReturnsRecipientWhenSetViaConstructor() { $options = new MicrosoftTeamsOptions([ - 'recipient_id' => $recipient = '/webhook/foo', + 'recipient_id' => $recipient = '/webhookb2/foo', ]); $this->assertSame($recipient, $options->getRecipientId()); @@ -39,7 +39,7 @@ public function testGetRecipientIdReturnsRecipientWhenSetViaConstructor() public function testGetRecipientIdReturnsRecipientWhenSetSetter() { $options = (new MicrosoftTeamsOptions()) - ->recipient($recipient = '/webhook/foo'); + ->recipient($recipient = '/webhookb2/foo'); $this->assertSame($recipient, $options->getRecipientId()); } @@ -58,7 +58,7 @@ public function testRecipientMethodThrowsIfValueDoesNotMatchRegex() $recipient = 'foo'; $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage(sprintf('"%s" require recipient id format to be "/webhook/{uuid}@{uuid}/IncomingWebhook/{id}/{uuid}", "%s" given.', MicrosoftTeamsOptions::class, $recipient)); + $this->expectExceptionMessage(sprintf('"%s" require recipient id format to be "/webhookb2/{uuid}@{uuid}/IncomingWebhook/{id}/{uuid}", "%s" given.', MicrosoftTeamsOptions::class, $recipient)); $options->recipient($recipient); }