prefix
stringlengths
512
512
suffix
stringlengths
256
256
middle
stringlengths
14
229
meta
dict
* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Transport; use Symfony\Component\Notifier\Exception\...
Scheme()) { return new NullTransport($this->dispatcher); } throw new UnsupportedSchemeException($dsn, 'null', $this->getSupportedSchemes()); } protected function getSupportedSchemes(): array { return ['null
NullTransport { if ('null' === $dsn->get
{ "filepath": "src/Symfony/Component/Notifier/Transport/NullTransportFactory.php", "language": "php", "file_size": 840, "cut_index": 520, "middle_length": 52 }
buted with this source code. */ namespace Symfony\Component\Notifier\Notification; use Psr\Log\LogLevel; use Symfony\Component\ErrorHandler\Exception\FlattenException; use Symfony\Component\Notifier\Recipient\RecipientInterface; /** * @author Fabien Potencier <fabien@symfony.com> */ class Notification { priva...
medium'; public const IMPORTANCE_LOW = 'low'; private array $channels = []; private string $subject = ''; private string $content = ''; private string $emoji = ''; private ?FlattenException $exception = null; private string $ex
gLevel::CRITICAL => 500, LogLevel::ALERT => 550, LogLevel::EMERGENCY => 600, ]; public const IMPORTANCE_URGENT = 'urgent'; public const IMPORTANCE_HIGH = 'high'; public const IMPORTANCE_MEDIUM = '
{ "filepath": "src/Symfony/Component/Notifier/Notification/Notification.php", "language": "php", "file_size": 5295, "cut_index": 716, "middle_length": 229 }
?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Message; /** * @author Jan Schädlich <jan.sc...
turn $this->decoratedMessage->getSubject(); } public function getOptions(): ?MessageOptionsInterface { return $this->decoratedMessage->getOptions(); } public function getTransport(): ?string { return $this->decorat
{ $this->decoratedMessage = $message; } public function getRecipientId(): ?string { return $this->decoratedMessage->getRecipientId(); } public function getSubject(): string { re
{ "filepath": "src/Symfony/Component/Notifier/Message/NullMessage.php", "language": "php", "file_size": 1042, "cut_index": 513, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Recipient; use Symfony\Component\Notifier\Exception\Inva...
dArgumentException(\sprintf('"%s" needs an email or a phone but both cannot be empty.', static::class)); } $this->email = $email; $this->phone = $phone; } /** * @return $this */ public function email(string $
ecipientInterface { use EmailRecipientTrait; use SmsRecipientTrait; public function __construct(string $email = '', string $phone = '') { if ('' === $email && '' === $phone) { throw new Invali
{ "filepath": "src/Symfony/Component/Notifier/Recipient/Recipient.php", "language": "php", "file_size": 1335, "cut_index": 524, "middle_length": 229 }
hp /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Tests; use PHPUnit\Framework\TestCase; use Symf...
elDoesNotHaveRecipient() { $this->expectException(LogicException::class); $this->expectExceptionMessage('The "sms" channel needs a Recipient.'); $notifier = new Notifier(['sms' => new SmsChannel(new NullTransport())]);
ifier; use Symfony\Component\Notifier\Transport\NullTransport; /** * @author Smaïne Milianni <smaine.milianni@gmail.com> */ final class NotifierTest extends TestCase { public function testItThrowAnExplicitErrorIfAnSmsChann
{ "filepath": "src/Symfony/Component/Notifier/Tests/NotifierTest.php", "language": "php", "file_size": 1076, "cut_index": 515, "middle_length": 229 }
?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Transport; use Symfony\Component\Notifier\Mes...
s->currentTransport)) { $this->currentTransport = parent::getNextTransport($message); } return $this->currentTransport; } protected function getInitialCursor(): int { return 0; } protected function
private ?TransportInterface $currentTransport = null; protected function getNextTransport(MessageInterface $message): ?TransportInterface { if (null === $this->currentTransport || $this->isTransportDead($thi
{ "filepath": "src/Symfony/Component/Notifier/Transport/FailoverTransport.php", "language": "php", "file_size": 1058, "cut_index": 513, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Message; use Symfony\Component\Notifier\Notification\Notification; /** * @author Ahmed Ghanem...
cation $notification): self { $message = new self($notification->getSubject(), $notification->getContent()); $message->setNotification($notification); return $message; } public function getSubject(): string {
null; public function __construct( private string $subject, private string $content, private ?MessageOptionsInterface $options = null, ) { } public static function fromNotification(Notifi
{ "filepath": "src/Symfony/Component/Notifier/Message/DesktopMessage.php", "language": "php", "file_size": 2443, "cut_index": 563, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\EventListener; use Symfony\Component\EventDispatcher\EventSubscriberI...
e { public function __construct( private Notifier $notifier, ) { } public function onMessageFailed(WorkerMessageFailedEvent $event): void { if ($event->willRetry()) { return; } $throwable =
tion; use Symfony\Component\Notifier\Notifier; /** * Sends a rejected message to the notifier. * * @author Fabien Potencier <fabien@symfony.com> */ class SendFailedMessageToNotifierListener implements EventSubscriberInterfac
{ "filepath": "src/Symfony/Component/Notifier/EventListener/SendFailedMessageToNotifierListener.php", "language": "php", "file_size": 1799, "cut_index": 537, "middle_length": 229 }
is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Transport; use Symfony\Component\Notifier\Exception\IncompleteDsnEx...
rface { /** * @throws UnsupportedSchemeException * @throws IncompleteDsnException * @throws MissingRequiredOptionException */ public function create(Dsn $dsn): TransportInterface; public function supports(Dsn $dsn): bool; }
dchick@gmail.com> */ interface TransportFactoryInte
{ "filepath": "src/Symfony/Component/Notifier/Transport/TransportFactoryInterface.php", "language": "php", "file_size": 844, "cut_index": 535, "middle_length": 52 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Message; /** * @author Jérémy Romey <jeremy@free-agent....
original; } public function getTransport(): string { return $this->transport; } public function setMessageId(string $id): void { $this->messageId = $id; } public function getMessageId(): ?string {
__construct( private MessageInterface $original, private string $transport, private array $info = [], ) { } public function getOriginalMessage(): MessageInterface { return $this->
{ "filepath": "src/Symfony/Component/Notifier/Message/SentMessage.php", "language": "php", "file_size": 1420, "cut_index": 524, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\SimpleTextin; use Symfony\Component\Notifier\Exception\InvalidArgumentException; use Symfony\Component\Notifier\Exception\TransportExceptio...
nInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** * @author gnito-org <https://github.com/gnito-org> */ final class SimpleTextinTransport extends AbstractTransport { protected const HOST = 'api-app2.simpletexting.com'; publi
mfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Transport\AbstractTransport; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\Exception\TransportExceptio
{ "filepath": "src/Symfony/Component/Notifier/Bridge/SimpleTextin/SimpleTextinTransport.php", "language": "php", "file_size": 3405, "cut_index": 614, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Mobyt; use Symfony\Component\Notifier\Exception\U...
ew UnsupportedSchemeException($dsn, 'mobyt', $this->getSupportedSchemes()); } $accountSid = $this->getUser($dsn); $authToken = $this->getPassword($dsn); $from = $dsn->getRequiredOption('from'); $typeQuality = $dsn->
com> */ final class MobytTransportFactory extends AbstractTransportFactory { public function create(Dsn $dsn): MobytTransport { $scheme = $dsn->getScheme(); if ('mobyt' !== $scheme) { throw n
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Mobyt/MobytTransportFactory.php", "language": "php", "file_size": 1390, "cut_index": 524, "middle_length": 229 }
?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Tests\Mailer; use Symfony\Component\Mailer\En...
ivate RawMessage $sentMessage; public function send(RawMessage $message, ?Envelope $envelope = null): void { $this->sentMessage = $message; } public function getSentEmail(): RawMessage { return $this->sentMessage;
rface { pr
{ "filepath": "src/Symfony/Component/Notifier/Tests/Mailer/DummyMailer.php", "language": "php", "file_size": 787, "cut_index": 513, "middle_length": 14 }
ackage. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Tests\Transport; use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Compo...
} public function getSubject(): string { return 'subject'; } public function getOptions(): ?MessageOptionsInterface { return null; } public function getTransport(): ?string { return null; }
tId(): ?string { return 'recipient_id';
{ "filepath": "src/Symfony/Component/Notifier/Tests/Transport/DummyMessage.php", "language": "php", "file_size": 871, "cut_index": 559, "middle_length": 52 }
buted with this source code. */ namespace Symfony\Component\Notifier\Tests\Transport; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; use Symfony\Component\Notifier\Exception\LogicException; use Symfony\Component\Notifier\Exception\RuntimeException; use Symfony\Component\Notifier\Exception\Tr...
public function testToString() { $t1 = $this->createMock(TransportInterface::class); $t1->expects($this->once())->method('__toString')->willReturn('t1://local'); $t2 = $this->createMock(TransportInterface::class);
erface; #[Group('time-sensitive')] class FailoverTransportTest extends TestCase { public function testSendNoTransports() { $this->expectException(LogicException::class); new FailoverTransport([]); }
{ "filepath": "src/Symfony/Component/Notifier/Tests/Transport/FailoverTransportTest.php", "language": "php", "file_size": 6421, "cut_index": 716, "middle_length": 229 }
n Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Tests\Transport; use PHPUnit\Framework\TestCase; use Symfony\Component\Notifier\Transport\NullTransport; use Symfo...
ing) (new NullTransport())); } public function testSend() { $nullTransport = new NullTransport( $eventDispatcherMock = $this->createMock(EventDispatcherInterface::class) ); $eventDispatcherMock->expects($th
ing() { $this->assertEquals('null', (str
{ "filepath": "src/Symfony/Component/Notifier/Tests/Transport/NullTransportTest.php", "language": "php", "file_size": 986, "cut_index": 582, "middle_length": 52 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Tests\Message; use PHPUnit\Framework\TestCase; use Symfony\Component\...
; } public function testSetSubject() { $message = new DesktopMessage('Hello', 'World'); $message->setSubject('dlrow olleH'); $this->assertSame('dlrow olleH', $message->getSubject()); } public function testSet
e { public function testCanBeConstructed() { $message = new DesktopMessage('Hello', 'World'); $this->assertSame('Hello', $message->getSubject()); $this->assertSame('World', $message->getContent())
{ "filepath": "src/Symfony/Component/Notifier/Tests/Message/DesktopMessageTest.php", "language": "php", "file_size": 1829, "cut_index": 537, "middle_length": 229 }
he Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Tests\Message; use Symfony\Component\Notifier\Message\MessageInterface; use Sym...
return 'recipient_id'; } public function getSubject(): string { return 'subject'; } public function getOptions(): ?MessageOptionsInterface { return null; } public function getTransport(): ?string {
ic function getRecipientId(): ?string {
{ "filepath": "src/Symfony/Component/Notifier/Tests/Message/DummyMessageWithTransport.php", "language": "php", "file_size": 889, "cut_index": 547, "middle_length": 52 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Tests\Message; use PHPUnit\Framework\Attributes\DataProv...
$this->assertSame($message->getSubject(), $nullMessage->getSubject()); $this->assertSame($message->getRecipientId(), $nullMessage->getRecipientId()); $this->assertSame($message->getOptions(), $nullMessage->getOptions()); $th
@sensiolabs.de> */ class NullMessageTest extends TestCase { #[DataProvider('messageDataProvider')] public function testCanBeConstructed(MessageInterface $message) { $nullMessage = new NullMessage($message);
{ "filepath": "src/Symfony/Component/Notifier/Tests/Message/NullMessageTest.php", "language": "php", "file_size": 1265, "cut_index": 524, "middle_length": 229 }
hp /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Tests\Message; use PHPUnit\Framework\TestCase; ...
e->getOriginalMessage()); $this->assertSame('any', $sentMessage->getTransport()); $this->assertSame('the_id', $sentMessage->getMessageId()); $this->assertSame(['foo' => 'bar'], $sentMessage->getInfo()); $this->assertSame('ba
$originalMessage = new DummyMessage(); $sentMessage = new SentMessage($originalMessage, 'any', ['foo' => 'bar']); $sentMessage->setMessageId('the_id'); $this->assertSame($originalMessage, $sentMessag
{ "filepath": "src/Symfony/Component/Notifier/Tests/Message/SentMessageTest.php", "language": "php", "file_size": 1109, "cut_index": 515, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Tests\Recipient; use PHPUnit\Framework\Attributes\DataProvider; use P...
''); } #[DataProvider('provideValidEmailAndPhone')] public function testCanBeConstructed(string $email, string $phone) { $recipient = new Recipient($email, $phone); $this->assertSame($email, $recipient->getEmail());
sensiolabs.de> */ class RecipientTest extends TestCase { public function testCannotBeConstructedWithoutEmailAndWithoutPhone() { $this->expectException(InvalidArgumentException::class); new Recipient('',
{ "filepath": "src/Symfony/Component/Notifier/Tests/Recipient/RecipientTest.php", "language": "php", "file_size": 1727, "cut_index": 537, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Tests\Event; use PHPUnit\Framework\Attributes\DataProvid...
{ $this->assertEquals($event, new SentMessageEvent($message)); } #[DataProvider('messagesProvider')] public function testGetMessage(SentMessage $message, SentMessageEvent $event) { $this->assertSame($message, $event->get
e; use Symfony\Component\Notifier\Message\SmsMessage; final class SentMessageEventTest extends TestCase { #[DataProvider('messagesProvider')] public function testConstruct(SentMessage $message, SentMessageEvent $event)
{ "filepath": "src/Symfony/Component/Notifier/Tests/Event/SentMessageEventTest.php", "language": "php", "file_size": 1356, "cut_index": 524, "middle_length": 229 }
Unit\Framework\TestCase; use Symfony\Bridge\PhpUnit\ClassExistsMock; use Symfony\Component\Notifier\Bridge; use Symfony\Component\Notifier\Exception\UnsupportedSchemeException; use Symfony\Component\Notifier\Transport\Dsn; #[RunTestsInSeparateProcesses] final class UnsupportedSchemeExceptionTest extends TestCase { ...
false, Bridge\Brevo\BrevoTransportFactory::class => false, Bridge\Chatwork\ChatworkTransportFactory::class => false, Bridge\ClickSend\ClickSendTransportFactory::class => false, Bridge\Clickatell\ClickatellTra
actory::class => false, Bridge\AmazonSns\AmazonSnsTransportFactory::class => false, Bridge\Bandwidth\BandwidthTransportFactory::class => false, Bridge\Bluesky\BlueskyTransportFactory::class =>
{ "filepath": "src/Symfony/Component/Notifier/Tests/Exception/UnsupportedSchemeExceptionTest.php", "language": "php", "file_size": 12482, "cut_index": 921, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Tests\Channel; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; use Sy...
strapFlashMessageImportanceMapper; use Symfony\Component\Notifier\FlashMessage\DefaultFlashMessageImportanceMapper; use Symfony\Component\Notifier\FlashMessage\FlashMessageImportanceMapperInterface; use Symfony\Component\Notifier\Notification\Notification;
tion\Session\Storage\MockArraySessionStorage; use Symfony\Component\Notifier\Channel\BrowserChannel; use Symfony\Component\Notifier\Exception\FlashMessageImportanceMapperException; use Symfony\Component\Notifier\FlashMessage\Boot
{ "filepath": "src/Symfony/Component/Notifier/Tests/Channel/BrowserChannelTest.php", "language": "php", "file_size": 3861, "cut_index": 614, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\Notifier\Tests\Transport; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Component\Notifier\Exception\InvalidArgumentException; use Symfony\Component\Notifier\Exception\MissingRequiredOptionException; use Symfony\...
$this->assertSame($scheme, $dsn->getScheme()); $this->assertSame($host, $dsn->getHost()); $this->assertSame($user, $dsn->getUser()); $this->assertSame($password, $dsn->getPassword()); $this->assertSame($port, $dsn->getPort(
host, ?string $user = null, ?string $password = null, ?int $port = null, array $options = [], ?string $path = null) { $dsn = new Dsn($dsnString); $this->assertSame($dsnString, $dsn->getOriginalDsn());
{ "filepath": "src/Symfony/Component/Notifier/Tests/Transport/DsnTest.php", "language": "php", "file_size": 8318, "cut_index": 716, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Tests\Transport; use PHPUnit\Framework\TestCase; use Sym...
yTest extends TestCase { private NullTransportFactory $nullTransportFactory; protected function setUp(): void { $this->nullTransportFactory = new NullTransportFactory( new EventDispatcher(), new MockHttpClient()
fier\Transport\Dsn; use Symfony\Component\Notifier\Transport\NullTransport; use Symfony\Component\Notifier\Transport\NullTransportFactory; /** * @author Jan Schädlich <jan.schaedlich@sensiolabs.de> */ class NullTransportFactor
{ "filepath": "src/Symfony/Component/Notifier/Tests/Transport/NullTransportFactoryTest.php", "language": "php", "file_size": 1445, "cut_index": 524, "middle_length": 229 }
he Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Tests\Message; use Symfony\Component\Notifier\Message\MessageInterface; use Sym...
return 'recipient_id'; } public function getSubject(): string { return 'subject'; } public function getOptions(): ?MessageOptionsInterface { return null; } public function getTransport(): ?string {
ublic function getRecipientId(): ?string {
{ "filepath": "src/Symfony/Component/Notifier/Tests/Message/DummyMessageWithoutTransport.php", "language": "php", "file_size": 885, "cut_index": 547, "middle_length": 52 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Tests\Message; use PHPUnit\Framework\TestCase; use Symfony\Component\...
public function testSetSubject() { $message = new PushMessage('Hello', 'World'); $message->subject('dlrow olleH'); $this->assertSame('dlrow olleH', $message->getSubject()); } public function testSetContent() {
public function testCanBeConstructed() { $message = new PushMessage('Hello', 'World'); $this->assertSame('Hello', $message->getSubject()); $this->assertSame('World', $message->getContent()); }
{ "filepath": "src/Symfony/Component/Notifier/Tests/Message/PushMessageTest.php", "language": "php", "file_size": 1818, "cut_index": 537, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Tests\Event; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpClient\MockHttpClient; use S...
ractTransport; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; class FailedMessageEventTest extends TestCase { #[DataProvider('messagesProvider')] public function testConstruct(MessageInterface $message, \Throwable $error, FailedMe
e\MessageInterface; use Symfony\Component\Notifier\Message\SentMessage; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Tests\Transport\DummyMessage; use Symfony\Component\Notifier\Transport\Abst
{ "filepath": "src/Symfony/Component/Notifier/Tests/Event/FailedMessageEventTest.php", "language": "php", "file_size": 3682, "cut_index": 614, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Tests\Transport; use PHPUnit\Framework\TestCase; use Symfony\Component\Notifier\Exception\InvalidArgumentException; use Symfony\Component\Notifier...
s->createMock(TransportInterface::class), ]); $message = new ChatMessage('subject'); $one->method('supports')->willReturnMap([ [$message, true], ]); $one->expects($this->once())->method('send')->willRe
use Symfony\Component\Notifier\Transport\Transports; class TransportsTest extends TestCase { public function testSendToTransportDefinedByMessage() { $transports = new Transports([ 'one' => $one = $thi
{ "filepath": "src/Symfony/Component/Notifier/Tests/Transport/TransportsTest.php", "language": "php", "file_size": 4091, "cut_index": 614, "middle_length": 229 }
/* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Tests\Channel; use PHPUnit\Framework\TestCase; use...
$this->expectException(LogicException::class); new DummyChannel(); } } class DummyChannel extends AbstractChannel { public function notify(Notification $notification, RecipientInterface $recipient, ?string $transportName = null): v
tifier\Recipient\RecipientInterface; /** * @author Jan Schädlich <jan.schaedlich@sensiolabs.de> */ class AbstractChannelTest extends TestCase { public function testChannelCannotBeConstructedWithoutTransportAndBus() {
{ "filepath": "src/Symfony/Component/Notifier/Tests/Channel/AbstractChannelTest.php", "language": "php", "file_size": 1151, "cut_index": 518, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Discord; use Symfony\Component\Notifier\Exception\TransportException; use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeExcept...
* @author Mathieu Piot <math.piot@gmail.com> */ final class DiscordTransport extends AbstractTransport { protected const HOST = 'discord.com'; public function __construct( #[\SensitiveParameter] private string $token, private str
fier\Transport\AbstractTransport; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /**
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Discord/DiscordTransport.php", "language": "php", "file_size": 3839, "cut_index": 614, "middle_length": 229 }
n Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Tests\Message; use PHPUnit\Framework\TestCase; use Symfony\Component\Notifier\Message\EmailMessage; use Symfony\Co...
ilOnCreationFromNotification() { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('"Symfony\Component\Notifier\Message\EmailMessage" needs an email, it cannot be empty.'); EmailMessage::fr
TestCase { public function testEnsureNonEmptyEma
{ "filepath": "src/Symfony/Component/Notifier/Tests/Message/EmailMessageTest.php", "language": "php", "file_size": 969, "cut_index": 582, "middle_length": 52 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Tests\Channel; use PHPUnit\Framework\Attributes\DataProvider; use PHP...
cy = new ChannelPolicy(['urgent' => ['chat']]); $channelPolicy->getChannels('low'); } #[DataProvider('provideValidPolicies')] public function testCanRetrieveChannels(array $policy, string $importance, array $expectedChannels) {
sensiolabs.de> */ class ChannelPolicyTest extends TestCase { public function testCannotRetrieveChannelsUsingUnavailableImportance() { $this->expectException(InvalidArgumentException::class); $channelPoli
{ "filepath": "src/Symfony/Component/Notifier/Tests/Channel/ChannelPolicyTest.php", "language": "php", "file_size": 1512, "cut_index": 537, "middle_length": 229 }
php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Event; use Symfony\Component\Notifier\Message\...
vate MessageInterface $message, private bool $queued = false, ) { } public function getMessage(): MessageInterface { return $this->message; } public function isQueued(): bool { return $this->queued;
t( pri
{ "filepath": "src/Symfony/Component/Notifier/Event/MessageEvent.php", "language": "php", "file_size": 789, "cut_index": 514, "middle_length": 14 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Mercure; use Symfony\Component\Notifier\Message\MessageOptionsInterface; /** * @author...
tify?: bool, * requireInteraction?: bool, * silent?: bool, * tag?: string, * timestamp?: int, * vibrate?: int|list<int>, * }|null $content */ public function __construct( string|array|null
* @param array{ * badge?: string, * body?: string, * data?: mixed, * dir?: 'auto'|'ltr'|'rtl', * icon?: string, * image?: string, * lang?: string, * reno
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Mercure/MercureOptions.php", "language": "php", "file_size": 2689, "cut_index": 563, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Mercure; use Symfony\Component\Mercure\Exception\InvalidArgume...
/** * @author Mathias Arlaud <mathias.arlaud@gmail.com> */ final class MercureTransportFactory extends AbstractTransportFactory { public function __construct( private HubRegistry $registry, ?EventDispatcherInterface $dispatcher = nul
e Symfony\Component\Notifier\Transport\AbstractTransportFactory; use Symfony\Component\Notifier\Transport\Dsn; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface;
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Mercure/MercureTransportFactory.php", "language": "php", "file_size": 1913, "cut_index": 537, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Mercure\Tests; use Symfony\Component\Mercure\HubInterface; use Symfony\Component\Mercure...
function createFactory(): MercureTransportFactory { $hub = $this->createStub(HubInterface::class); $hubRegistry = new HubRegistry($hub, ['hubId' => $hub]); return new MercureTransportFactory($hubRegistry); } public st
ctTransportFactoryTestCase; use Symfony\Component\Notifier\Transport\Dsn; /** * @author Mathias Arlaud <mathias.arlaud@gmail.com> */ final class MercureTransportFactoryTest extends AbstractTransportFactoryTestCase { public
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Mercure/Tests/MercureTransportFactoryTest.php", "language": "php", "file_size": 2350, "cut_index": 563, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\Notifier\Bridge\Mercure\Tests; use Symfony\Component\Mercure\Exception\InvalidArgumentException; use Symfony\Component\Mercure\Exception\RuntimeException as MercureRuntimeException; use Symfony\Component\Mercure\HubInterface; use Symfony\Component\Mercure\J...
fony\Component\Notifier\Message\ChatMessage; use Symfony\Component\Notifier\Message\MessageOptionsInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; use Symfony\Component\Notifier\Tests\Tran
r\Bridge\Mercure\MercureTransport; use Symfony\Component\Notifier\Bridge\Mercure\Tests\Fixtures\DummyHub; use Symfony\Component\Notifier\Exception\LogicException; use Symfony\Component\Notifier\Exception\RuntimeException; use Sym
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Mercure/Tests/MercureTransportTest.php", "language": "php", "file_size": 7267, "cut_index": 716, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Firebase; use Symfony\Component\Notifier\Exception\InvalidArgumentException; use Symfony\Component\Notifier\Exception\TransportException; u...
terface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** * @author Jeroen Spee <https://github.com/Jeroeny> */ final class FirebaseTransport extends AbstractTransport { protected const HOST = 'fcm.googleapis.com/fcm/send'; public func
y\Component\Notifier\Message\SentMessage; use Symfony\Component\Notifier\Transport\AbstractTransport; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\Exception\TransportExceptionIn
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Firebase/FirebaseTransport.php", "language": "php", "file_size": 3678, "cut_index": 614, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Firebase\Notification; use Symfony\Component\Notifier\Bridge\Firebase\FirebaseOptions; ...
@return $this */ public function sound(string $sound): static { $this->options['sound'] = $sound; return $this; } /** * @return $this */ public function tag(string $tag): static { $this->opt
annel_id'] = $channelId; return $this; } /** * @return $this */ public function icon(string $icon): static { $this->options['icon'] = $icon; return $this; } /** *
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Firebase/Notification/AndroidNotification.php", "language": "php", "file_size": 2297, "cut_index": 563, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Firebase\Tests; use PHPUnit\Framework\Attributes\DataProvider; use Symfony\Component\Htt...
stCase; use Symfony\Component\Notifier\Tests\Transport\DummyMessage; use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\ResponseInterface; /** * @author Oskar Stark <oskarstark@googlemail.com> */ final class FirebaseT
irebaseTransport; use Symfony\Component\Notifier\Exception\TransportException; use Symfony\Component\Notifier\Message\ChatMessage; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTe
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Firebase/Tests/FirebaseTransportTest.php", "language": "php", "file_size": 2760, "cut_index": 563, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Firebase\Tests\Notification; use PHPUnit\Framework\TestCase; use Symfony\Component\Notif...
'title' => 'Test Title', 'body' => 'Test Body', ], 'data' => ['key' => 'value'], ], $notification->toArray()); $this->assertSame('device_token', $notification->getRecipientId()); }
fication('device_token', [ 'title' => 'Test Title', 'body' => 'Test Body', ], ['key' => 'value']); $this->assertSame([ 'to' => 'device_token', 'notification' => [
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Firebase/Tests/Notification/IOSNotificationTest.php", "language": "php", "file_size": 2893, "cut_index": 563, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Tests\Message; use PHPUnit\Framework\TestCase; use Symfony\Component\Notifier\Message\SmsMessag...
on testCanBeConstructedWithFrom() { $message = new SmsMessage('+3312345678', 'subject', 'foo'); $this->assertSame('subject', $message->getSubject()); $this->assertSame('+3312345678', $message->getPhone()); $this->assert
+3312345678', 'subject'); $this->assertSame('subject', $message->getSubject()); $this->assertSame('+3312345678', $message->getPhone()); $this->assertSame('', $message->getFrom()); } public functi
{ "filepath": "src/Symfony/Component/Notifier/Tests/Message/SmsMessageTest.php", "language": "php", "file_size": 2350, "cut_index": 563, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Event; use Symfony\Component\Notifier\Message\MessageInterface; /** ...
; } /** * @return MessageEvent[] */ public function getEvents(?string $name = null): array { if (null === $name) { return $this->events; } $events = []; foreach ($this->events as $even
): void { $this->events[] = $event; $this->transports[(string) $event->getMessage()->getTransport()] = true; } public function getTransports(): array { return array_keys($this->transports)
{ "filepath": "src/Symfony/Component/Notifier/Event/NotificationEvents.php", "language": "php", "file_size": 1509, "cut_index": 537, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Mercure\Tests; use PHPUnit\Framework\TestCase; us...
public function testConstructWithParameters() { $options = (new MercureOptions('/topic/1', true, 'id', 'type', 1, ['tag' => '1234', 'body' => 'TEST'])); $this->assertSame([ 'topics' => ['/topic/1'], 'priva
'topics' => null, 'private' => false, 'id' => null, 'type' => null, 'retry' => null, 'content' => null, ], (new MercureOptions())->toArray()); }
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Mercure/Tests/MercureOptionsTest.php", "language": "php", "file_size": 1373, "cut_index": 524, "middle_length": 229 }
ackage. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Mercure\Tests\Fixtures; use Symfony\Component\Mercure\HubInterface; use Symfony\Comp...
tion getPublicUrl(): string { } public function getProvider(): TokenProviderInterface { } public function getFactory(): ?TokenFactoryInterface { return null; } public function publish(Update $update): string
nction getUrl(): string { } public func
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Mercure/Tests/Fixtures/DummyHub.php", "language": "php", "file_size": 880, "cut_index": 559, "middle_length": 52 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Firebase; use Symfony\Component\Notifier\Exceptio...
throw new UnsupportedSchemeException($dsn, 'firebase', $this->getSupportedSchemes()); } $token = \sprintf('%s:%s', $this->getUser($dsn), $this->getPassword($dsn)); $host = 'default' === $dsn->getHost() ? null : $dsn->getHost()
eroeny> */ final class FirebaseTransportFactory extends AbstractTransportFactory { public function create(Dsn $dsn): FirebaseTransport { $scheme = $dsn->getScheme(); if ('firebase' !== $scheme) {
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Firebase/FirebaseTransportFactory.php", "language": "php", "file_size": 1261, "cut_index": 524, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Firebase\Tests\Notification; use PHPUnit\Framework\TestCase; use Symfony\Component\Notifier\Bridge\Firebase\Notification\AndroidNotificatio...
le', 'body' => 'Test Body', ], 'data' => ['key' => 'value'], ], $notification->toArray()); $this->assertSame('device_token', $notification->getRecipientId()); } public function testAndroidNo
'title' => 'Test Title', 'body' => 'Test Body', ], ['key' => 'value']); $this->assertSame([ 'to' => 'device_token', 'notification' => [ 'title' => 'Test Tit
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Firebase/Tests/Notification/AndroidNotificationTest.php", "language": "php", "file_size": 3074, "cut_index": 614, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Mercure; use Symfony\Component\Mercure\Exception\InvalidArgumentException; use Symfony\Component\Mercure\Exception\RuntimeException as Merc...
mfony\Component\Notifier\Message\SentMessage; use Symfony\Component\Notifier\Transport\AbstractTransport; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** * @author Mathias Arlaud <
\Exception\UnsupportedMessageTypeException; use Symfony\Component\Notifier\Exception\UnsupportedOptionsException; use Symfony\Component\Notifier\Message\ChatMessage; use Symfony\Component\Notifier\Message\MessageInterface; use Sy
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Mercure/MercureTransport.php", "language": "php", "file_size": 3531, "cut_index": 614, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Firebase\Notification; use Symfony\Component\Notifier\Bridge\F...
* @return $this */ public function clickAction(string $clickAction): static { $this->options['click_action'] = $clickAction; return $this; } /** * @return $this */ public function subtitle(string $subtit
ns['sound'] = $sound; return $this; } /** * @return $this */ public function badge(string $badge): static { $this->options['badge'] = $badge; return $this; } /**
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Firebase/Notification/IOSNotification.php", "language": "php", "file_size": 1964, "cut_index": 537, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Firebase\Tests; use Symfony\Component\Notifier\Br...
return new FirebaseTransportFactory(); } public static function createProvider(): iterable { yield [ 'firebase://host.test', 'firebase://username:password@host.test', ]; } public static functi
Stark <oskarstark@googlemail.com> */ final class FirebaseTransportFactoryTest extends AbstractTransportFactoryTestCase { use IncompleteDsnTestTrait; public function createFactory(): FirebaseTransportFactory {
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Firebase/Tests/FirebaseTransportFactoryTest.php", "language": "php", "file_size": 1493, "cut_index": 524, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Firebase\Tests\Notification; use PHPUnit\Framework\TestCase; use Symfony\Component\Notif...
'title' => 'Test Title', 'body' => 'Test Body', ], 'data' => ['key' => 'value'], ], $notification->toArray()); $this->assertSame('device_token', $notification->getRecipientId()); }
fication('device_token', [ 'title' => 'Test Title', 'body' => 'Test Body', ], ['key' => 'value']); $this->assertSame([ 'to' => 'device_token', 'notification' => [
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Firebase/Tests/Notification/WebNotificationTest.php", "language": "php", "file_size": 2369, "cut_index": 563, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\SimpleTextin; use Symfony\Component\Notifier\Exce...
$dsn->getScheme(); if (self::TRANSPORT_SCHEME !== $scheme) { throw new UnsupportedSchemeException($dsn, self::TRANSPORT_SCHEME, $this->getSupportedSchemes()); } $apiKey = $this->getUser($dsn); $from = $dsn->ge
/gnito-org> */ final class SimpleTextinTransportFactory extends AbstractTransportFactory { private const TRANSPORT_SCHEME = 'simpletextin'; public function create(Dsn $dsn): SimpleTextinTransport { $scheme =
{ "filepath": "src/Symfony/Component/Notifier/Bridge/SimpleTextin/SimpleTextinTransportFactory.php", "language": "php", "file_size": 1372, "cut_index": 524, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\SimpleTextin\Tests; use PHPUnit\Framework\Attributes\DataProvider; use Symfony\Component\HttpClient\MockHttpClient; use Symfony\Component\H...
ient\HttpClientInterface; use Symfony\Contracts\HttpClient\ResponseInterface; final class SimpleTextinTransportTest extends TransportTestCase { public static function createTransport(?HttpClientInterface $client = null, string $from = 'test_from'): Si
ent\Notifier\Message\ChatMessage; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; use Symfony\Component\Notifier\Tests\Transport\DummyMessage; use Symfony\Contracts\HttpCl
{ "filepath": "src/Symfony/Component/Notifier/Bridge/SimpleTextin/Tests/SimpleTextinTransportTest.php", "language": "php", "file_size": 3527, "cut_index": 614, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Primotexto; use Symfony\Component\Notifier\Messag...
{ $this->options['campaignName'] = $campaignName; return $this; } /** * @return $this */ public function category(string $category): static { $this->options['category'] = $category; return $this;
private array $options = [], ) { } public function getRecipientId(): ?string { return null; } /** * @return $this */ public function campaignName(string $campaignName): static
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Primotexto/PrimotextoOptions.php", "language": "php", "file_size": 1328, "cut_index": 524, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Primotexto; use Symfony\Component\Notifier\Except...
throw new UnsupportedSchemeException($dsn, 'primotexto', $this->getSupportedSchemes()); } $apiKey = $this->getUser($dsn); $from = $dsn->getOption('from'); $host = 'default' === $dsn->getHost() ? null : $dsn->getHo
l.com> */ final class PrimotextoTransportFactory extends AbstractTransportFactory { public function create(Dsn $dsn): PrimotextoTransport { $scheme = $dsn->getScheme(); if ('primotexto' !== $scheme) {
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Primotexto/PrimotextoTransportFactory.php", "language": "php", "file_size": 1278, "cut_index": 524, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Primotexto\Tests; use Symfony\Component\Notifier\...
public static function createProvider(): iterable { yield [ 'primotexto://host.test', 'primotexto://apiKey@host.test', ]; yield [ 'primotexto://host.test?from=TEST', 'primote
motextoTransportFactoryTest extends AbstractTransportFactoryTestCase { use IncompleteDsnTestTrait; public function createFactory(): PrimotextoTransportFactory { return new PrimotextoTransportFactory(); }
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Primotexto/Tests/PrimotextoTransportFactoryTest.php", "language": "php", "file_size": 1484, "cut_index": 524, "middle_length": 229 }
buted with this source code. */ namespace Symfony\Component\Notifier\Bridge\Sweego; use Symfony\Component\Notifier\Exception\TransportException; use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException; use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\Se...
bstractTransport { protected const HOST = 'api.sweego.io'; public function __construct( #[\SensitiveParameter] private readonly string $apiKey, private readonly string $region, private readonly string $campaignType,
mfony\Contracts\HttpClient\Exception\TransportExceptionInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** * @author Mathieu Santostefano <msantostefano@protonmail.com> */ final class SweegoTransport extends A
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Sweego/SweegoTransport.php", "language": "php", "file_size": 5468, "cut_index": 716, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Sweego\Tests; use Symfony\Component\Notifier\Bridge\Sweego\Swe...
nction createProvider(): iterable { yield [ 'sweego://host.test?region=REGION&campaign_type=CAMPAIGN_TYPE&bat=0&shorten_urls=1&shorten_with_protocol=1', 'sweego://apiKey@host.test?region=REGION&campaign_type=CAMPAIGN_TYP
ryTest extends AbstractTransportFactoryTestCase { use MissingRequiredOptionTestTrait; public function createFactory(): SweegoTransportFactory { return new SweegoTransportFactory(); } public static fu
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Sweego/Tests/SweegoTransportFactoryTest.php", "language": "php", "file_size": 1910, "cut_index": 537, "middle_length": 229 }
/* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Sweego\Tests\Webhook; use Symfony\Component...
protected function createRequest(string $payload): Request { return Request::create('/', 'POST', [], [], [], [ 'Content-Type' => 'application/json', 'HTTP_webhook-id' => 'a5ccc627-6e43-4012-bb29-f1bfe3a3d13e',
st\AbstractRequestParserTestCase; class SweegoRequestParserTest extends AbstractRequestParserTestCase { protected function createRequestParser(): RequestParserInterface { return new SweegoRequestParser(); }
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Sweego/Tests/Webhook/SweegoRequestParserTest.php", "language": "php", "file_size": 1169, "cut_index": 518, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Sweego\Webhook; use Symfony\Component\HttpFoundation\ChainRequestMatcher; use Symfony\Co...
tParser; use Symfony\Component\Webhook\Exception\RejectWebhookException; /** * @author Mathieu Santostefano <msantostefano@protonmail.com> * * @see https://learn.sweego.io/docs/webhooks/sms_events */ final class SweegoRequestParser extends AbstractReq
Component\HttpFoundation\RequestMatcher\MethodRequestMatcher; use Symfony\Component\HttpFoundation\RequestMatcherInterface; use Symfony\Component\RemoteEvent\Event\Sms\SmsEvent; use Symfony\Component\Webhook\Client\AbstractReques
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Sweego/Webhook/SweegoRequestParser.php", "language": "php", "file_size": 2759, "cut_index": 563, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Mobyt; use Symfony\Component\Notifier\Exception\InvalidArgumentException; use Symfony\Co...
private array $options = [], ) { if (isset($options['message_type'])) { self::validateMessageType($options['message_type']); } } public static function fromNotification(Notification $notification): self {
s implements MessageOptionsInterface { public const MESSAGE_TYPE_QUALITY_HIGH = 'N'; public const MESSAGE_TYPE_QUALITY_MEDIUM = 'L'; public const MESSAGE_TYPE_QUALITY_LOW = 'LL'; public function __construct(
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Mobyt/MobytOptions.php", "language": "php", "file_size": 2407, "cut_index": 563, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Firebase; use Symfony\Component\Notifier\Message\MessageOption...
private string $to, array $options, private array $data = [], ) { $this->options = $options; } public function toArray(): array { return [ 'to' => $this->to, 'notification' => $this->
nts MessageOptionsInterface { /** * @see https://firebase.google.com/docs/cloud-messaging/xmpp-server-ref.html#notification-payload-support */ protected array $options; public function __construct(
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Firebase/FirebaseOptions.php", "language": "php", "file_size": 1642, "cut_index": 537, "middle_length": 229 }
/* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Event; use Symfony\Component\Notifier\Message\Mes...
private MessageInterface $message, private \Throwable $error, ) { } public function getMessage(): MessageInterface { return $this->message; } public function getError(): \Throwable { return $this-
_construct(
{ "filepath": "src/Symfony/Component/Notifier/Event/FailedMessageEvent.php", "language": "php", "file_size": 804, "cut_index": 517, "middle_length": 14 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\SimpleTextin\Tests; use Symfony\Component\Notifie...
ry(); } public static function createProvider(): iterable { yield ['simpletextin://host.test', 'simpletextin://ApiKey@host.test']; yield ['simpletextin://host.test?from=15556667777', 'simpletextin://ApiKey@host.test?from=155566
ss SimpleTextinTransportFactoryTest extends AbstractTransportFactoryTestCase { use IncompleteDsnTestTrait; public function createFactory(): SimpleTextinTransportFactory { return new SimpleTextinTransportFacto
{ "filepath": "src/Symfony/Component/Notifier/Bridge/SimpleTextin/Tests/SimpleTextinTransportFactoryTest.php", "language": "php", "file_size": 1473, "cut_index": 524, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Primotexto; use Symfony\Component\Notifier\Exception\TransportException; use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeExc...
* * @author Samaël Tomas <samael.tomas@gmail.com> */ final class PrimotextoTransport extends AbstractTransport { protected const HOST = 'api.primotexto.com'; public function __construct( #[\SensitiveParameter] private string $api
tifier\Transport\AbstractTransport; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /*
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Primotexto/PrimotextoTransport.php", "language": "php", "file_size": 3338, "cut_index": 614, "middle_length": 229 }
he Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Primotexto\Tests; use PHPUnit\Framework\TestCase; use Symfony\Component\...
->category('test_category') ->campaignName('test_campaign_name'); self::assertSame([ 'date' => 1714121739, 'category' => 'test_category', 'campaignName' => 'test_campaign_name', ], $pri
ons()) ->campaignDate(1714121739)
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Primotexto/Tests/PrimotextoOptionsTest.php", "language": "php", "file_size": 891, "cut_index": 547, "middle_length": 52 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Sweego\Tests; use Symfony\Component\HttpClient\MockHttpClient; use Symfony\Component\HttpClient\Response\JsonMockResponse; use Symfony\Comp...
nent\Notifier\Test\TransportTestCase; use Symfony\Component\Notifier\Tests\Transport\DummyMessage; use Symfony\Contracts\HttpClient\HttpClientInterface; final class SweegoTransportTest extends TransportTestCase { public static function createTransport
Component\Notifier\Message\ChatMessage; use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\MessageOptionsInterface; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Compo
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Sweego/Tests/SweegoTransportTest.php", "language": "php", "file_size": 4763, "cut_index": 614, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Mobyt; use Symfony\Component\Notifier\Exception\TransportException; use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeExceptio...
@author Basien Durand <bdurand-dev@outlook.com> */ final class MobytTransport extends AbstractTransport { protected const HOST = 'app.mobyt.fr'; private string $typeQuality; public function __construct( private string $accountSid,
r\Transport\AbstractTransport; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** *
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Mobyt/MobytTransport.php", "language": "php", "file_size": 3632, "cut_index": 614, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\OrangeSms; use Symfony\Component\Notifier\Exception\TransportException; use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeExce...
nst HOST = 'api.orange.com'; public function __construct( private string $clientID, #[\SensitiveParameter] private string $clientSecret, private string $from, private ?string $senderName = null, ?HttpClientInter
ifier\Transport\AbstractTransport; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class OrangeSmsTransport extends AbstractTransport { protected co
{ "filepath": "src/Symfony/Component/Notifier/Bridge/OrangeSms/OrangeSmsTransport.php", "language": "php", "file_size": 3919, "cut_index": 614, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Sweego; use Symfony\Component\Notifier\Exception\UnsupportedSc...
new UnsupportedSchemeException($dsn, 'sweego', $this->getSupportedSchemes()); } $apiKey = $this->getUser($dsn); $region = $dsn->getRequiredOption(SweegoOptions::REGION); $campaignType = $dsn->getRequiredOption(SweegoOption
om> */ final class SweegoTransportFactory extends AbstractTransportFactory { public function create(Dsn $dsn): SweegoTransport { $scheme = $dsn->getScheme(); if ('sweego' !== $scheme) { throw
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Sweego/SweegoTransportFactory.php", "language": "php", "file_size": 1753, "cut_index": 537, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Primotexto; enum PrimotextoErrorCode: int { case NO_PHONE_NUMBER_PROVIDED = 10; ...
e SENDER_TOO_SHORT = 21; case SENDER_TOO_LONG = 22; case FULL_NUMERIC_SENDER_NOT_ALLOWED = 23; case NO_MESSAGE_CONTENT_PROVIDED = 30; case INVALID_CHARACTERS_IN_MESSAGE = 31; case MESSAGE_CONTENT_TOO_LONG = 32; case INVALID_CAMPAIGN
BER_ALREADY_EXISTS = 15; case NO_MESSAGE_FOR_THIS_QUERY = 16; case TOO_MANY_FIELDS_SELECTED = 17; case FILE_TOO_LARGE = 18; case PHONE_NUMBER_IS_FIXED_LINE = 19; case INVALID_CHARACTERS_IN_SENDER = 20; cas
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Primotexto/PrimotextoErrorCode.php", "language": "php", "file_size": 2073, "cut_index": 563, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Mobyt\Tests; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Component\Notifier\Bridge\Mobyt\Mob...
tions = MobytOptions::fromNotification($notification)->toArray(); $this->assertSame($expectedMessageType, $options['message_type']); } /** * @return \Generator<array{0: string, 1: string}> */ public static function fromNotif
ataProvider('fromNotificationDataProvider')] public function testFromNotification(string $importance, string $expectedMessageType) { $notification = (new Notification('Foo'))->importance($importance); $op
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Mobyt/Tests/MobytOptionsTest.php", "language": "php", "file_size": 3142, "cut_index": 614, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Mobyt\Tests; use Symfony\Component\HttpClient\MockHttpClient; ...
skarstark@googlemail.com> */ final class MobytTransportTest extends TransportTestCase { public static function createTransport(?HttpClientInterface $client = null, string $messageType = MobytOptions::MESSAGE_TYPE_QUALITY_LOW): MobytTransport {
Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; use Symfony\Component\Notifier\Tests\Transport\DummyMessage; use Symfony\Contracts\HttpClient\HttpClientInterface; /** * @author Oskar Stark <o
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Mobyt/Tests/MobytTransportTest.php", "language": "php", "file_size": 1750, "cut_index": 537, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\JoliNotif; use Joli\JoliNotif\DefaultNotifier as JoliNotifier; use Joli\JoliNotif\Notification as JoliNotification; use Symfony\Component\N...
acts\EventDispatcher\EventDispatcherInterface; /** * @author Ahmed Ghanem <ahmedghanem7361@gmail.com> */ final class JoliNotifTransport extends AbstractTransport { public function __construct( private readonly JoliNotifier $joliNotifier,
Component\Notifier\Message\DesktopMessage; use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SentMessage; use Symfony\Component\Notifier\Transport\AbstractTransport; use Symfony\Contr
{ "filepath": "src/Symfony/Component/Notifier/Bridge/JoliNotif/JoliNotifTransport.php", "language": "php", "file_size": 3050, "cut_index": 614, "middle_length": 229 }
/* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\JoliNotif; use Joli\JoliNotif\DefaultNotifi...
oliNotifTransport { if (self::SCHEME_NAME !== $dsn->getScheme()) { throw new UnsupportedSchemeException($dsn, self::SCHEME_NAME, $this->getSupportedSchemes()); } return (new JoliNotifTransport(new JoliNotifier(), $t
port\Dsn; /** * @author Ahmed Ghanem <ahmedghanem7361@gmail.com> */ final class JoliNotifTransportFactory extends AbstractTransportFactory { private const SCHEME_NAME = 'jolinotif'; public function create(Dsn $dsn): J
{ "filepath": "src/Symfony/Component/Notifier/Bridge/JoliNotif/JoliNotifTransportFactory.php", "language": "php", "file_size": 1246, "cut_index": 518, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\JoliNotif\Tests; use Joli\JoliNotif\DefaultNotifier as JoliNot...
* * @author Ahmed Ghanem <ahmedghanem7361@gmail.com> */ final class JoliNotifTransportTest extends TransportTestCase { public static function toStringProvider(): iterable { yield ['jolinotif://localhost', self::createTransport()]; }
use Symfony\Component\Notifier\Message\DesktopMessage; use Symfony\Component\Notifier\Test\TransportTestCase; use Symfony\Component\Notifier\Tests\Transport\DummyMessage; use Symfony\Contracts\HttpClient\HttpClientInterface; /*
{ "filepath": "src/Symfony/Component/Notifier/Bridge/JoliNotif/Tests/JoliNotifTransportTest.php", "language": "php", "file_size": 1651, "cut_index": 537, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Sinch; use Symfony\Component\Notifier\Exception\U...
throw new UnsupportedSchemeException($dsn, 'sinch', $this->getSupportedSchemes()); } $accountSid = $this->getUser($dsn); $authToken = $this->getPassword($dsn); $from = $dsn->getRequiredOption('from'); $host = 'defau
@gmail.com> */ final class SinchTransportFactory extends AbstractTransportFactory { public function create(Dsn $dsn): SinchTransport { $scheme = $dsn->getScheme(); if ('sinch' !== $scheme) {
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Sinch/SinchTransportFactory.php", "language": "php", "file_size": 1327, "cut_index": 524, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Sinch\Tests; use Symfony\Component\HttpClient\Moc...
ic function createTransport(?HttpClientInterface $client = null): SinchTransport { return new SinchTransport('accountSid', 'authToken', 'sender', $client ?? new MockHttpClient()); } public static function toStringProvider(): iterable
onent\Notifier\Test\TransportTestCase; use Symfony\Component\Notifier\Tests\Transport\DummyMessage; use Symfony\Contracts\HttpClient\HttpClientInterface; final class SinchTransportTest extends TransportTestCase { public stat
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Sinch/Tests/SinchTransportTest.php", "language": "php", "file_size": 1397, "cut_index": 524, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Bluesky; use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; ...
kyTransportFactory extends AbstractTransportFactory { public function __construct( ?EventDispatcherInterface $dispatcher = null, ?HttpClientInterface $client = null, private ?LoggerInterface $logger = null, private reado
Component\Notifier\Transport\Dsn; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** * @author Tobias Nyholm <tobias.nyholm@gmail.com> */ final class Blues
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Bluesky/BlueskyTransportFactory.php", "language": "php", "file_size": 1767, "cut_index": 537, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Bluesky\Tests; use Symfony\Component\Notifier\Bri...
ion createProvider(): iterable { yield [ 'bluesky://bsky.social', 'bluesky://user:pass@bsky.social', ]; } public static function supportsProvider(): iterable { yield [true, 'bluesky://foo:bar
ctoryTest extends AbstractTransportFactoryTestCase { use IncompleteDsnTestTrait; public function createFactory(): BlueskyTransportFactory { return new BlueskyTransportFactory(); } public static funct
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Bluesky/Tests/BlueskyTransportFactoryTest.php", "language": "php", "file_size": 1436, "cut_index": 524, "middle_length": 229 }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Discord; use Symfony\Component\Notifier\Exception\LogicException; use Symfony\Component\Notifier\Exception\TransportException; use Symfony\...
e Symfony\Contracts\HttpClient\HttpClientInterface; /** * @author Mathieu Piot <math.piot@gmail.com> * @author Tomas Norkūnas <norkunas.tom@gmail.com> */ final class DiscordBotTransport extends AbstractTransport { protected const HOST = 'discord.co
\Notifier\Message\SentMessage; use Symfony\Component\Notifier\Transport\AbstractTransport; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; us
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Discord/DiscordBotTransport.php", "language": "php", "file_size": 4056, "cut_index": 614, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Sweego\Tests\Webhook; use Symfony\Component\HttpF...
tParserInterface { $this->expectException(RejectWebhookException::class); $this->expectExceptionMessage('Invalid signature.'); return new SweegoRequestParser(); } protected function createRequest(string $payload): Requ
n\RejectWebhookException; use Symfony\Component\Webhook\Test\AbstractRequestParserTestCase; class SweegoWrongSignatureRequestParserTest extends AbstractRequestParserTestCase { protected function createRequestParser(): Reques
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Sweego/Tests/Webhook/SweegoWrongSignatureRequestParserTest.php", "language": "php", "file_size": 1343, "cut_index": 524, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Sweego; use Symfony\Component\Notifier\Message\MessageOptionsI...
{ } public function toArray(): array { return $this->options; } public function getRecipientId(): ?string { return null; } public function bat(bool $bat): self { $this->options[self::BAT] = $ba
ic const CAMPAIGN_ID = 'campaign_id'; public const SHORTEN_URLS = 'shorten_urls'; public const SHORTEN_WITH_PROTOCOL = 'shorten_with_protocol'; public function __construct( private array $options = [], )
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Sweego/SweegoOptions.php", "language": "php", "file_size": 1543, "cut_index": 537, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\JoliNotif\Tests; use PHPUnit\Framework\TestCase; ...
'subtitle', 'This is a subtitle'); $joliOptions->setExtraOption('sound', 'Frog'); $this->assertSame([ 'icon_path' => '/sample/icon/path', 'extra_options' => [ 'subtitle' => 'This is a subtitle',
/ class JoliNotifOptionsTest extends TestCase { public function testToArray() { $joliOptions = new JoliNotifOptions(); $joliOptions->setIconPath('/sample/icon/path'); $joliOptions->setExtraOption(
{ "filepath": "src/Symfony/Component/Notifier/Bridge/JoliNotif/Tests/JoliNotifOptionsTest.php", "language": "php", "file_size": 1331, "cut_index": 524, "middle_length": 229 }
/* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\JoliNotif\Tests; use Symfony\Component\Noti...
ion=true', ]; } public static function supportsProvider(): iterable { yield [true, 'jolinotif://host.test']; yield [false, 'somethingElse://host.test']; } public static function unsupportedSchemeProvider(): ite
JoliNotifTransportFactoryTest extends AbstractTransportFactoryTestCase { public static function createProvider(): iterable { yield [ 'jolinotif://host.test', 'jolinotif://host.test?some_opt
{ "filepath": "src/Symfony/Component/Notifier/Bridge/JoliNotif/Tests/JoliNotifTransportFactoryTest.php", "language": "php", "file_size": 1217, "cut_index": 518, "middle_length": 229 }
ny\Component\Mime\Part\File; use Symfony\Component\Notifier\Exception\TransportException; use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException; use Symfony\Component\Notifier\Message\ChatMessage; use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SentMess...
author Tobias Nyholm <tobias.nyholm@gmail.com> */ final class BlueskyTransport extends AbstractTransport { private array $authSession = []; private ClockInterface $clock; public function __construct( #[\SensitiveParameter] private str
ntDispatcherInterface; use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface; use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** * @
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Bluesky/BlueskyTransport.php", "language": "php", "file_size": 11088, "cut_index": 921, "middle_length": 229 }
se Symfony\Component\HttpClient\MockHttpClient; use Symfony\Component\HttpClient\Response\JsonMockResponse; use Symfony\Component\Mime\Part\File; use Symfony\Component\Notifier\Bridge\Bluesky\BlueskyOptions; use Symfony\Component\Notifier\Bridge\Bluesky\BlueskyTransport; use Symfony\Component\Notifier\Exception\LogicEx...
clock; protected function setUp(): void { self::$clock = new MockClock(new \DateTimeImmutable('@1714293617')); } public static function createTransport(?HttpClientInterface $client = null): BlueskyTransport { $blueskyT
otifier\Test\TransportTestCase; use Symfony\Component\Notifier\Tests\Transport\DummyMessage; use Symfony\Contracts\HttpClient\HttpClientInterface; final class BlueskyTransportTest extends TransportTestCase { private static $
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Bluesky/Tests/BlueskyTransportTest.php", "language": "php", "file_size": 15838, "cut_index": 921, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\JoliNotif; use Symfony\Component\Notifier\Exception\InvalidArgumentException; use Symfon...
'extra_options' => $this->extraOptions, ]; } public function getRecipientId(): ?string { return null; } /** * @return $this */ public function setIconPath(string $iconPath): static { $
function __construct( private ?string $iconPath = null, private array $extraOptions = [], ) { } public function toArray(): array { return [ 'icon_path' => $this->iconPath,
{ "filepath": "src/Symfony/Component/Notifier/Bridge/JoliNotif/JoliNotifOptions.php", "language": "php", "file_size": 2036, "cut_index": 563, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Sinch\Tests; use Symfony\Component\Notifier\Bridge\Sinch\Sinch...
tFactory { return new SinchTransportFactory(); } public static function createProvider(): iterable { yield [ 'sinch://host.test?from=0611223344', 'sinch://accountSid:authToken@host.test?from=06112233
equiredOptionTestTrait; final class SinchTransportFactoryTest extends AbstractTransportFactoryTestCase { use IncompleteDsnTestTrait; use MissingRequiredOptionTestTrait; public function createFactory(): SinchTranspor
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Sinch/Tests/SinchTransportFactoryTest.php", "language": "php", "file_size": 1889, "cut_index": 537, "middle_length": 229 }
This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Bluesky; use Symfony\Component\Mime\Part\File; us...
function attachMedia(File $file, string $description = ''): static { $this->options['attach'][] = [ 'file' => $file, 'description' => $description, ]; return $this; } public function attachCard(
[], ) { } public function toArray(): array { return $this->options; } public function getRecipientId(): ?string { return null; } /** * @return $this */ public
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Bluesky/BlueskyOptions.php", "language": "php", "file_size": 1308, "cut_index": 524, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Mobyt\Tests; use Symfony\Component\Notifier\Bridge\Mobyt\Mobyt...
actory(); } public static function createProvider(): iterable { yield [ 'mobyt://host.test?from=FROM&type_quality=LL', 'mobyt://accountSid:authToken@host.test?from=FROM', ]; yield [
lemail.com> */ final class MobytTransportFactoryTest extends AbstractTransportFactoryTestCase { use IncompleteDsnTestTrait; public function createFactory(): MobytTransportFactory { return new MobytTransportF
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Mobyt/Tests/MobytTransportFactoryTest.php", "language": "php", "file_size": 1856, "cut_index": 537, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Discord; use Symfony\Component\Notifier\Bridge\Discord\Embeds\DiscordEmbedInterface; use...
rivate array $options = [], ) { } public function toArray(): array { return $this->options; } /** * @param non-empty-string $id * * @return $this */ public function recipient(string $id): static
s <norkunas.tom@gmail.com> */ final class DiscordOptions implements MessageOptionsInterface { /** * @var non-empty-string|null */ private ?string $recipientId = null; public function __construct( p
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Discord/DiscordOptions.php", "language": "php", "file_size": 2238, "cut_index": 563, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Sinch; use Symfony\Component\Notifier\Exception\TransportException; use Symfony\Componen...
\Contracts\HttpClient\HttpClientInterface; /** * @author Iliya Miroslavov Iliev <i.miroslavov@gmail.com> */ final class SinchTransport extends AbstractTransport { protected const HOST = 'sms.api.sinch.com'; public function __construct(
r\Message\SmsMessage; use Symfony\Component\Notifier\Transport\AbstractTransport; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; use Symfony
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Sinch/SinchTransport.php", "language": "php", "file_size": 2905, "cut_index": 563, "middle_length": 229 }
part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Discord; use Symfony\Component\Notifier\Exception\UnsupportedS...
ce { $scheme = $dsn->getScheme(); if ('discord' === $scheme) { $token = $this->getUser($dsn); $webhookId = $dsn->getRequiredOption('webhook_id'); $host = 'default' === $dsn->getHost() ? null : $dsn->
** * @author Mathieu Piot <math.piot@gmail.com> * @author Tomas Norkūnas <norkunas.tom@gmail.com> */ final class DiscordTransportFactory extends AbstractTransportFactory { public function create(Dsn $dsn): TransportInterfa
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Discord/DiscordTransportFactory.php", "language": "php", "file_size": 1750, "cut_index": 537, "middle_length": 229 }
ony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Discord\Embeds; /** * @author Karoly Gossler <connor@connor.hu> */ final class DiscordFieldEmbedObject extends AbstractDiscordEmb...
lue): static { $this->options['value'] = $value; return $this; } /** * @return $this */ public function inline(bool $inline): static { $this->options['inline'] = $inline; return $this; }
n $this */ public function value(string $va
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Discord/Embeds/DiscordFieldEmbedObject.php", "language": "php", "file_size": 916, "cut_index": 606, "middle_length": 52 }
hp /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Discord\Embeds; /** * @author Karoly Go...
} /** * @return $this */ public function height(int $height): static { $this->options['height'] = $height; return $this; } /** * @return $this */ public function width(int $width): static
$this->options['url'] = $url; return $this; } /** * @return $this */ public function proxyUrl(string $proxyUrl): static { $this->options['proxy_url'] = $proxyUrl; return $this;
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Discord/Embeds/DiscordMediaEmbedObject.php", "language": "php", "file_size": 1079, "cut_index": 515, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Discord\Tests; use Symfony\Component\HttpClient\MockHttpClient; use Symfony\Component\Ht...
\TransportTestCase; use Symfony\Component\Notifier\Tests\Transport\DummyMessage; use Symfony\Contracts\HttpClient\HttpClientInterface; final class DiscordBotTransportTest extends TransportTestCase { public static function createTransport(?HttpClientIn
ier\Exception\LogicException; use Symfony\Component\Notifier\Exception\TransportException; use Symfony\Component\Notifier\Message\ChatMessage; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Discord/Tests/DiscordBotTransportTest.php", "language": "php", "file_size": 2605, "cut_index": 563, "middle_length": 229 }
ge. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Bridge\Discord\Tests; use Symfony\Component\HttpClient\MockHttpClient; use Symfony\Component\Ht...
terface; final class DiscordTransportTest extends TransportTestCase { public static function createTransport(?HttpClientInterface $client = null): DiscordTransport { return (new DiscordTransport('testToken', 'testWebhookId', $client ?? new
age\ChatMessage; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Test\TransportTestCase; use Symfony\Component\Notifier\Tests\Transport\DummyMessage; use Symfony\Contracts\HttpClient\HttpClientIn
{ "filepath": "src/Symfony/Component/Notifier/Bridge/Discord/Tests/DiscordTransportTest.php", "language": "php", "file_size": 2024, "cut_index": 563, "middle_length": 229 }