 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Zendesk;

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\SentMessage;
use Symfony\Component\Noti

 * @author Joseph Bielawski <stloyd@gmail.com>
 */
final class ZendeskTransport extends AbstractTransport
{
    public function __construct(
        private string $email,
        #[\SensitiveParameter] private string $token,
        ?HttpClientInterface $


 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\LinkedIn;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Smaïne Milianni <smaine.milianni@

        throw new UnsupportedSchemeException($dsn, 'linkedin', $this->getSupportedSchemes());
        }

        $authToken = $this->getUser($dsn);
        $accountId = $this->getPassword($dsn);
        $host = 'default' === $dsn->getHost() ? null : $dsn->

gmail.com>
 */
final class LinkedInTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): LinkedInTransport
    {
        $scheme = $dsn->getScheme();

        if ('linkedin' !== $scheme) {


 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\LinkedIn\Share;

use Symfony\Component\Notifier\Exception\LogicException;

/**
 * @author Smaïne Milianni <smaine.milianni@gmail.com>
 *
 * @see https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/ugc-post-api#sche

t PROCESSING_FAILED = 'PROCESSING_FAILED';
    public const DELETED = 'DELETED';
    public const PUBLISHED_EDITED = 'PUBLISHED_EDITED';

    private const AVAILABLE_LIFECYCLE = [
        self::DRAFT,
        self::PUBLISHED,
        self::PROCESSING_FAILE

ma lifecycleState section
 */
final class LifecycleStateShare extends AbstractLinkedInShare
{
    public const DRAFT = 'DRAFT';
    public const PUBLISHED = 'PUBLISHED';
    public const PROCESSING = 'PROCESSING';
    public cons


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\LinkedIn\Share;

use Symfony\Component\Notifier\Exception\LogicException;

/**
 * @author Smaïne Milianni <smaine.milianni@gmail.com>
 */
final class VisibilityShare extends AbstractLinkedInShare
{
    public const MEMBER_NETWORK_VISIBILITY = 'MemberNetworkVisibility';
    public

private const MEMBER_NETWORK = [
        self::CONNECTIONS,
        self::PUBLIC,
        self::LOGGED_IN,
    ];

    private const AVAILABLE_VISIBILITY = [
        self::MEMBER_NETWORK_VISIBILITY,
        self::SPONSORED_CONTENT_VISIBILITY,
    ];

    p

const SPONSORED_CONTENT_VISIBILITY = 'SponsoredContentVisibility';

    public const CONNECTIONS = 'CONNECTIONS';
    public const PUBLIC = 'PUBLIC';
    public const LOGGED_IN = 'LOGGED_IN';
    public const DARK = 'DARK';


 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\LinkedIn\Tests;

use Symfony\Component\Notifier\Bridge\LinkedIn\LinkedInTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;

final class LinkedInT

static function createProvider(): iterable
    {
        yield [
            'linkedin://host.test',
            'linkedin://accessToken:UserId@host.test',
        ];
    }

    public static function supportsProvider(): iterable
    {
        yield [true,

ransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;

    public function createFactory(): LinkedInTransportFactory
    {
        return new LinkedInTransportFactory();
    }

    public


 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\FreeMobile;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Antoine Makdessi <amakdessi@me.

        throw new UnsupportedSchemeException($dsn, 'freemobile', $this->getSupportedSchemes());
        }

        $login = $this->getUser($dsn);
        $password = $this->getPassword($dsn);
        $phone = $dsn->getRequiredOption('phone');

        $hos

com>
 */
final class FreeMobileTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): FreeMobileTransport
    {
        $scheme = $dsn->getScheme();

        if ('freemobile' !== $scheme) {


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\FreeMobile\Tests;

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\Notifier\Bridge\FreeMobile\FreeMobileTransport;
use Symfony\Component\Notifier\Exception\InvalidArgumentException;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\No

Test extends TransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null): FreeMobileTransport
    {
        return new FreeMobileTransport('login', 'pass', '0611223344', $client ?? new MockHttpClient());
    }

    p

tifier\Message\SmsMessage;
use Symfony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;

final class FreeMobileTransport


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\Yunpian;

use Symfony\Component\Notifier\Exception\InvalidArgumentException;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\

ntracts\HttpClient\Exception\ExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Mathieu Santostefano <msantostefano@protonmail.com>
 */
class YunpianTransport extends AbstractTransport
{
    protected const HOST = 'sm

Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Co


 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\Yunpian\Tests;

use Symfony\Component\Notifier\Bridge\Yunpian\YunpianTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;

final class YunpianTrans

 function createProvider(): iterable
    {
        yield [
            'yunpian://host.test',
            'yunpian://api_key@host.test',
        ];
    }

    public static function supportsProvider(): iterable
    {
        yield [true, 'yunpian://api_key

portFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;

    public function createFactory(): YunpianTransportFactory
    {
        return new YunpianTransportFactory();
    }

    public static


 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\Mastodon;

use Symfony\Component\Mime\Part\File;
use Symfony\Component\Notifier\Message\MessageOptionsInterface;

final class MastodonOptions implements MessageOptionsInterface
{
    public function __construct(
        private array $options

     * @return $this
     */
    public function poll(array $choices, int $expiresIn): static
    {
        $this->options['poll'] = [
            'options' => $choices,
            'expires_in' => $expiresIn,
        ];

        return $this;
    }

 = [],
    ) {
    }

    public function toArray(): array
    {
        return $this->options;
    }

    public function getRecipientId(): ?string
    {
        return null;
    }

    /**
     * @param string[] $choices
     *


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\LinkedIn;

use Symfony\Component\Notifier\Bridge\LinkedIn\Share\AuthorShare;
use Symfony\Component\Notifier\Bridge\LinkedIn\Share\LifecycleStateShare;
use Symfony\Component\Notifier\Bridge\LinkedIn\Share\ShareContentShare;
use Symfony\Component\Notifier\Bridge\LinkedIn\Share\VisibilityShare;
use Symfony\Component\Notifier\Message\

on __construct(
        private array $options = [],
    ) {
    }

    public function toArray(): array
    {
        return $this->options;
    }

    public function getRecipientId(): ?string
    {
        return null;
    }

    public static function

MessageOptionsInterface;
use Symfony\Component\Notifier\Notification\Notification;

/**
 * @author Smaïne Milianni <smaine.milianni@gmail.com>
 */
final class LinkedInOptions implements MessageOptionsInterface
{
    public functi


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\LinkedIn;

use Symfony\Component\Notifier\Bridge\LinkedIn\Share\AuthorShare;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Exception\UnsupportedOptionsException;
use Symfony\Component\Notifier\Message\ChatMessage

face;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Smaïne Milianni <smaine.milianni@gmail.com>
 *
 * @see https://docs.microsoft.com/en-us/linkedin/marketing/i

;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInter


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\LinkedIn\Share;

use Symfony\Component\Notifier\Exception\LogicException;

/**
 * @author Smaïne Milianni <smaine.milianni@gmail.com>
 *
 * @see https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/ugc-post-api#sharemedia
 */
class ShareMedi

_UP = 'SIGN_UP';
    public const SUBSCRIBE = 'SUBSCRIBE ';
    public const REGISTER = 'REGISTER';

    public const ALL = [
        self::LEARN_MORE,
        self::APPLY_NOW,
        self::DOWNLOAD,
        self::GET_QUOTE,
        self::SIGN_UP,

aShare extends AbstractLinkedInShare
{
    public const LEARN_MORE = 'LEARN_MORE';
    public const APPLY_NOW = 'APPLY_NOW ';
    public const DOWNLOAD = 'DOWNLOAD';
    public const GET_QUOTE = 'GET_QUOTE';
    public const SIGN


buted with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\LinkedIn\Tests;

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\Notifier\Bridge\LinkedIn\LinkedInTransport;
use Symfony\Component\Notifier\Exception\LogicException;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\MessageOptionsInterface;
use Symfony\

racts\HttpClient\HttpClientInterface;
use Symfony\Contracts\HttpClient\ResponseInterface;

final class LinkedInTransportTest extends TransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null): LinkedInTransport

Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Notification\Notification;
use Symfony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Cont


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\FreeMobile;

use Symfony\Component\Notifier\Exception\InvalidArgumentException;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symf

nterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Antoine Makdessi <amakdessi@me.com>
 */
final class FreeMobileTransport extends AbstractTransport
{
    protected const HOST = 'smsapi.free-mobile.fr/sendmsg';

    public func

ony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionI


/*
 * 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\Yunpian;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Mathieu Santostefano <msanto

ortedSchemeException($dsn, 'yunpian', $this->getSupportedSchemes());
        }

        $apiKey = $this->getUser($dsn);
        $host = 'default' === $dsn->getHost() ? null : $dsn->getHost();

        return (new YunpianTransport($apiKey, $this->client, $t

stefano@protonmail.com>
 */
class YunpianTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): YunpianTransport
    {
        if ('yunpian' !== $dsn->getScheme()) {
            throw new Unsupp


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\Zendesk;

use Symfony\Component\Notifier\Message\MessageOptionsInterface;

/**
 * @author Joseph Bielawski <stloyd@gmail.com>
 */
final class ZendeskOptions implements MessageOptionsInterface
{
    public function __construct(
        private ?string $priority = null,
    ) {
    }

    public function toArray(): array

>priority,
        ];
    }

    public function getRecipientId(): ?string
    {
        return null;
    }

    /**
     * @return $this
     */
    public function priority(string $priority): static
    {
        $this->priority = $priority;

        ret

 {
        return [
            'priority' => $this-


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\LinkedIn\Tests;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\LinkedIn\LinkedInOptions;
use Symfony\Component\Notifier\Bridge\LinkedIn\Share\AuthorShare;
use Symfony\Component\Notifier\Bridge\LinkedIn\Share\LifecycleStateShare;
use Symfony\Component\Notifier\Bridge\LinkedIn\Share\ShareContentShare;
use Sym

$options = new LinkedInOptions([
            'contentCertificationRecord' => 'test_record',
            'firstPublishedAt' => 1234567890,
        ]);

        $this->assertSame([
            'contentCertificationRecord' => 'test_record',
            'first

fony\Component\Notifier\Bridge\LinkedIn\Share\VisibilityShare;
use Symfony\Component\Notifier\Notification\Notification;

final class LinkedInOptionsTest extends TestCase
{
    public function testLinkedInOptions()
    {


/*
 * 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\Mastodon;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Quentin Dequippe <quentin@d

           throw new UnsupportedSchemeException($dsn, 'mastodon', $this->getSupportedSchemes());
        }

        $token = $this->getUser($dsn);
        $host = $dsn->getHost();
        $port = $dsn->getPort();

        return (new MastodonTransport($tok

equippe.tech>
 */
final class MastodonTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): MastodonTransport
    {
        $scheme = $dsn->getScheme();

        if ('mastodon' !== $scheme) {


 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\FreeMobile\Tests;

use Symfony\Component\Notifier\Bridge\FreeMobile\FreeMobileTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
use Symfony\Component\Notifie

ory(): FreeMobileTransportFactory
    {
        return new FreeMobileTransportFactory();
    }

    public static function createProvider(): iterable
    {
        yield [
            'freemobile://host.test?phone=0611223344',
            'freemobile://log

r\Test\MissingRequiredOptionTestTrait;

final class FreeMobileTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;
    use MissingRequiredOptionTestTrait;

    public function createFact


 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\Zendesk\Tests;

use Symfony\Component\Notifier\Bridge\Zendesk\ZendeskTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;

final class ZendeskTrans

 function createProvider(): iterable
    {
        yield [
            'zendesk://subdomain.zendesk.com',
            'zendesk://email:token@subdomain.zendesk.com',
        ];
    }

    public static function supportsProvider(): iterable
    {
        yie

portFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;

    public function createFactory(): ZendeskTransportFactory
    {
        return new ZendeskTransportFactory();
    }

    public static


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\MessageMedia;

use Symfony\Component\Notifier\Message\MessageOptionsInterface;

/**
 * @author gnito-org <https://github.com/gnito-org>
 */
final class MessageMediaOptions implements MessageOptionsInterface
{
    public function __construct(
        private array $options = [],

_url'] = $callbackUrl;

        return $this;
    }

    /**
     * @return $this
     */
    public function deliveryReport(bool $deliveryReport): static
    {
        $this->options['delivery_report'] = $deliveryReport;

        return $this;
    }

  ) {
    }

    public function getRecipientId(): ?string
    {
        return null;
    }

    /**
     * @return $this
     */
    public function callbackUrl(string $callbackUrl): static
    {
        $this->options['callback


 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\MessageMedia;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Adrian Nguyen <vuphuong87@gma

e) {
            throw new UnsupportedSchemeException($dsn, 'messagemedia', $this->getSupportedSchemes());
        }

        $apiKey = $this->getUser($dsn);
        $apiSecret = $this->getPassword($dsn);
        $from = $dsn->getOption('from');
        $h

il.com>
 */
final class MessageMediaTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): MessageMediaTransport
    {
        $scheme = $dsn->getScheme();

        if ('messagemedia' !== $schem


 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\MessageMedia\Tests;

use Symfony\Component\Notifier\Bridge\MessageMedia\MessageMediaTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;

final class MessageMed

    public static function createProvider(): iterable
    {
        yield [
            'messagemedia://host.test',
            'messagemedia://apiKey:apiSecret@host.test',
        ];

        yield [
            'messagemedia://host.test?from=TEST',

iaTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;

    public function createFactory(): MessageMediaTransportFactory
    {
        return new MessageMediaTransportFactory();
    }


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\MessageMedia\Tests;

use PHPUnit\Framework\Attributes\DataProvider;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\Notifier\Bridge\MessageMedia\MessageMediaOptions;
use Symfony\Component\Notifier\Bridge\MessageMedia\MessageMediaTransport;
use Symfony\C

ony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;

final class MessageMediaTransportTest extends TransportTestCase
{
    public static function

omponent\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\TransportExceptionInterface;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symf


 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\Iqsms;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Oleksandr Barabolia <alexandrbarabol

  throw new UnsupportedSchemeException($dsn, 'iqsms', $this->getSupportedSchemes());
        }

        $login = $this->getUser($dsn);
        $password = $this->getPassword($dsn);
        $from = $dsn->getRequiredOption('from');
        $host = 'default'

ya@gmail.com>
 */
final class IqsmsTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): IqsmsTransport
    {
        $scheme = $dsn->getScheme();

        if ('iqsms' !== $scheme) {


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Pushy;

use Symfony\Component\Notifier\Bridge\Pushy\Enum\InterruptionLevel;
use Symfony\Component\Notifier\Exception\InvalidArgumentException;
use Symfony\Component\Notifier\Message\MessageOptionsInterface;
use Symfony\Component\Notifier\Notification\Notification;

/**
 * @author Joseph Bielawski <stloyd@gmail.com>
 *
 * @see http

cation(Notification $notification): self
    {
        $options = new self();
        $options->interruptionLevel(
            match ($notification->getImportance()) {
                Notification::IMPORTANCE_URGENT => InterruptionLevel::CRITICAL,

s://pushy.me/docs/api/send-notifications
 */
final class PushyOptions implements MessageOptionsInterface
{
    public function __construct(
        private array $options = [],
    ) {
    }

    public static function fromNotifi


/*
 * 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\Pushy;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;
use Symfony\Component\Notifier\Transport\Trans

sn->getScheme()) {
            throw new UnsupportedSchemeException($dsn, 'pushy', $this->getSupportedSchemes());
        }

        $apiKey = $dsn->getUser();
        $host = 'default' === $dsn->getHost() ? null : $dsn->getHost();
        $port = $dsn->ge

portInterface;

/**
 * @author Joseph Bielawski <stloyd@gmail.com>
 */
final class PushyTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): TransportInterface
    {
        if ('pushy' !== $d


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\Pushy\Tests;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\Pushy\Enum\InterruptionLevel;
use Symfony\Component\Notifier\Bridge\Pushy\PushyOptions;
use Symfony\Component\Notifier\Exception\InvalidArgumentException;

class PushyOptionsTest extends TestCase
{

    ->interruptionLevel(InterruptionLevel::TIME_SENSITIVE)
            ->body('Hello world!')
            ->contentAvailable(false)
            ->mutableContent(true)
            ->ttl(3600)
            ->threadId(123);

        self::assertSame([

    public function testPushyOptions()
    {
        $options = (new PushyOptions())
            ->to('device')
            ->collapseKey('key')
            ->schedule($schedule = (time() + 3600))
            ->badge(1)


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Pushy\Tests;

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\JsonMockResponse;
use Symfony\Component\Notifier\Bridge\Pushy\PushyOptions;
use Symfony\Component\Notifier\Bridge\Pushy\PushyTransport;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\

tInterface;
use Symfony\Contracts\HttpClient\ResponseInterface;

final class PushyTransportTest extends TransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null): PushyTransport
    {
        return new PushyTransp

PushMessage;
use Symfony\Component\Notifier\Notification\Notification;
use Symfony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClien


 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\MessageBird;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Vasilij Duško <vasilij@prado.l

         throw new UnsupportedSchemeException($dsn, 'messagebird', $this->getSupportedSchemes());
        }

        $token = $this->getUser($dsn);
        $from = $dsn->getRequiredOption('from');
        $host = 'default' === $dsn->getHost() ? null : $dsn

t>
 */
final class MessageBirdTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): MessageBirdTransport
    {
        $scheme = $dsn->getScheme();

        if ('messagebird' !== $scheme) {


 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\MessageBird\Tests;

use Symfony\Component\Notifier\Bridge\MessageBird\MessageBirdTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
use Symfony\Component\Noti

Factory(): MessageBirdTransportFactory
    {
        return new MessageBirdTransportFactory();
    }

    public static function createProvider(): iterable
    {
        yield [
            'messagebird://host.test?from=0611223344',
            'messagebir

fier\Test\MissingRequiredOptionTestTrait;

final class MessageBirdTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;
    use MissingRequiredOptionTestTrait;

    public function create


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\LinkedIn\Share;

use Symfony\Component\Notifier\Exception\LogicException;

/**
 * @author Smaïne Milianni <smaine.milianni@gmail.com>
 *
 * @see https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/ugc-post-api#sharecontent
 */
final class S

 const LEARNING_COURSE = 'LEARNING_COURSE';
    public const JOB = 'JOB';
    public const QUESTION = 'QUESTION';
    public const ANSWER = 'ANSWER';
    public const CAROUSEL = 'CAROUSEL';
    public const TOPIC = 'TOPIC';
    public const NATIVE_DOCUMENT

hareContentShare extends AbstractLinkedInShare
{
    public const ARTICLE = 'ARTICLE';
    public const IMAGE = 'IMAGE';
    public const NONE = 'NONE';
    public const RICH = 'RICH';
    public const VIDEO = 'VIDEO';
    public


 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\Zendesk\Tests;

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\Notifier\Bridge\Zendesk\ZendeskOptions;
use Symfony\Component\Notifier\Bridge\Zendesk\ZendeskTransport;
use Symfony\Component\Notifier\Message\ChatMessage;

blic static function createTransport(?HttpClientInterface $client = null): ZendeskTransport
    {
        return (new ZendeskTransport('testEmail', 'testToken', $client ?? new MockHttpClient()))->setHost('test.zendesk.com');
    }

    public static functi

use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Test\TransportTestCase;
use Symfony\Contracts\HttpClient\HttpClientInterface;

final class ZendeskTransportTest extends TransportTestCase
{
    pu


 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\MessageMedia\Tests;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\MessageMedia\MessageMediaOptions;

class MessageMediaOptionsTest extends TestCase
{
    public function testMessageMediaOptions()
    {
        $messag

       ->metadata(['test_metadata'])
            ->scheduled('test_scheduled')
            ->subject('test_subject');

        self::assertSame([
            'media' => ['test_media'],
            'callback_url' => 'test_callback_url',
            'format'

eMediaOptions = (new MessageMediaOptions())->
            media(['test_media'])
            ->callbackUrl('test_callback_url')
            ->format('test_format')
            ->deliveryReport(true)
            ->expiry(999)


 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\Iqsms\Tests;

use Symfony\Component\Notifier\Bridge\Iqsms\IqsmsTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
use Symfony\Component\Notifier\Test\MissingR

tFactory
    {
        return new IqsmsTransportFactory();
    }

    public static function createProvider(): iterable
    {
        yield [
            'iqsms://host.test?from=FROM',
            'iqsms://login:password@host.test?from=FROM',
        ];

equiredOptionTestTrait;

final class IqsmsTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;
    use MissingRequiredOptionTestTrait;

    public function createFactory(): IqsmsTranspor


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Pushy;

use Symfony\Component\Notifier\Exception\InvalidArgumentException;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\PushMessage;
use Symfony\C

face;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Joseph Bielawski <stloyd@gmail.com>
 */
final class PushyTransport extends AbstractTransport
{
    protected const HOST = 'api.pushy.me';

    public function __construct(

omponent\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInter


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\MessageBird;

use Symfony\Component\Notifier\Message\MessageOptionsInterface;

/**
 * @author gnito-org <https://github.com/gnito-org>
 */
final class MessageBirdOptions implements MessageOptionsInterface
{
    public function __construct(
        private array $options = [],

eatedDatetime'] = $createdDatetime;

        return $this;
    }

    /**
     * @return $this
     */
    public function dataCoding(string $dataCoding): static
    {
        $this->options['dataCoding'] = $dataCoding;

        return $this;
    }

    /*

) {
    }

    public function getRecipientId(): ?string
    {
        return null;
    }

    /**
     * @return $this
     */
    public function createdDatetime(string $createdDatetime): static
    {
        $this->options['cr


 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\MessageBird\Tests;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\MessageBird\MessageBirdOptions;

class MessageBirdOptionsTest extends TestCase
{
    public function testMessageBirdOptions()
    {
        $messageBirdOptions = (ne

gateway(999)
            ->groupIds(['test_group_ids'])
            ->mClass(888)
            ->reference('test_reference')
            ->reportUrl('test_report_url')
            ->shortenUrls(true)
            ->typeDetails('test_type_details')

w MessageBirdOptions())
            ->type('test_type')
            ->scheduledDatetime('test_scheduled_datetime')
            ->createdDatetime('test_created_datetime')
            ->dataCoding('test_data_coding')
            ->


 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\Zendesk;

use Symfony\Component\Notifier\Exception\IncompleteDsnException;
use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn

       if ('zendesk' !== $scheme) {
            throw new UnsupportedSchemeException($dsn, 'zendesk', $this->getSupportedSchemes());
        }

        $emailAddress = $this->getUser($dsn);
        $apiToken = $this->getPassword($dsn);
        $host = $thi

;

/**
 * @author Joseph Bielawski <stloyd@gmail.com>
 */
final class ZendeskTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): ZendeskTransport
    {
        $scheme = $dsn->getScheme();


 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\Ntfy;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;
use Symfony\Component\Notifier\Transport\TransportInterface;

/**

 {
            throw new UnsupportedSchemeException($dsn, 'ntfy', $this->getSupportedSchemes());
        }

        $host = 'default' === $dsn->getHost() ? null : $dsn->getHost();
        $topic = substr($dsn->getPath(), 1);

        if (\in_array($dsn->ge

 * @author Mickael Perraud <mikaelkael.fr@gmail.com>
 */
final class NtfyTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): TransportInterface
    {
        if ('ntfy' !== $dsn->getScheme())


 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\Ntfy\Tests;

use Symfony\Component\Notifier\Bridge\Ntfy\NtfyTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Transport\TransportFactoryInterface;

/**
 * @author Mickael Pe

   }

    public static function createProvider(): iterable
    {
        yield [
            'ntfy://ntfy.sh/test',
            'ntfy://user:password@default/test',
        ];
        yield [
            'ntfy://ntfy.sh/test',
            'ntfy://:passwor

rraud <mikaelkael.fr@gmail.com>
 */
final class NtfyTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    public function createFactory(): TransportFactoryInterface
    {
        return new NtfyTransportFactory();


buted with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Telegram;

use Symfony\Component\Notifier\Bridge\Telegram\Reply\Markup\AbstractTelegramReplyMarkup;
use Symfony\Component\Notifier\Message\MessageOptionsInterface;

/**
 * @author Mihail Krasilnikov <mihail.krasilnikov.j@gmail.com>
 */
final class TelegramOptions implements MessageOptionsInterface
{
    public const PARSE_MODE_HTML = 'HTML';
    public const PARSE_MODE_MARKDOWN = 'Markdown';
    public const PARSE_MODE_MARKDOWN_V2

    {
        return $this->options['chat_id'] ?? null;
    }

    /**
     * @return $this
     */
    public function chatId(string $id): static
    {
        $this->options['chat_id'] = $id;

        return $this;
    }

    /**
     * @return $this

 = 'MarkdownV2';

    public function __construct(
        private array $options = [],
    ) {
    }

    public function toArray(): array
    {
        return $this->options;
    }

    public function getRecipientId(): ?string


 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\Telegram;

use Symfony\Component\Notifier\Exception\IncompleteDsnException;
use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Ds

etScheme()) {
            throw new UnsupportedSchemeException($dsn, 'telegram', $this->getSupportedSchemes());
        }

        $token = $this->getToken($dsn);
        $channel = $dsn->getOption('channel');
        $host = 'default' === $dsn->getHost()

n;

/**
 * @author Fabien Potencier <fabien@symfony.com>
 */
final class TelegramTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): TelegramTransport
    {
        if ('telegram' !== $dsn->g


 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\Telegram\Tests;

use Symfony\Component\Notifier\Bridge\Telegram\TelegramTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;

final class TelegramTransportFacto

on createProvider(): iterable
    {
        yield ['telegram://host.test?channel=testChannel', 'telegram://user:password@host.test?channel=testChannel'];

        // Tests for `sslmode` option
        yield ['telegram://host.test?channel=testChannel&sslmod

ryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;

    public function createFactory(): TelegramTransportFactory
    {
        return new TelegramTransportFactory();
    }

    public static functi


?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\Bridge\Telegram\Reply\Markup;

use Symfony\Component\Notifier\Bridge\Telegram\Reply\Markup\Button\InlineKeyboardButton;

/**
 * @author Mihail Krasilnikov <mihail.krasilnikov.j@gmail.com>
 *
 * @see https://core.telegram.org/bots/api#inli

[] $buttons
     *
     * @return $this
     */
    public function inlineKeyboard(array $buttons): static
    {
        $buttons = array_map(static fn (InlineKeyboardButton $button) => $button->toArray(), $buttons);

        $this->options['inline_keyboar

nekeyboardmarkup
 */
final class InlineKeyboardMarkup extends AbstractTelegramReplyMarkup
{
    public function __construct()
    {
        $this->options['inline_keyboard'] = [];
    }

    /**
     * @param InlineKeyboardButton


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\MessageMedia;

use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\

ptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Adrian Nguyen <vuphuong87@gmail.com>
 */
final class MessageMediaTransport extends AbstractTransport
{
    protected const HOST = 'api.messagemedia.com';

    public func

Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExce


 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\Iqsms\Tests;

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\Notifier\Bridge\Iqsms\IqsmsTransport;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Comp

ic function createTransport(?HttpClientInterface $client = null): IqsmsTransport
    {
        return new IqsmsTransport('login', 'password', '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 IqsmsTransportTest extends TransportTestCase
{
    public stat


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\MessageBird;

use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\N

**
 * @author Vasilij Duško <vasilij@prado.lt>
 */
final class MessageBirdTransport extends AbstractTransport
{
    protected const HOST = 'rest.messagebird.com';

    public function __construct(
        #[\SensitiveParameter] private string $token,

otifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/


 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\MessageBird\Tests;

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\Notifier\Bridge\MessageBird\MessageBirdOptions;
use Symfony\Component\Notifier\Bridge\MessageBird\MessageBirdTransport;
use Symfony\Component\Notifier\Message\ChatM

final class MessageBirdTransportTest extends TransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null): MessageBirdTransport
    {
        return new MessageBirdTransport('token', 'from', $client ?? new MockHttpCl

essage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Ntfy\Tests;

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\Notifier\Bridge\Ntfy\NtfyTransport;
use Symfony\Component\Notifier\Message\PushMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Test\TransportTestCase

/
final class NtfyTransportTest extends TransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null): NtfyTransport
    {
        return new NtfyTransport('test', true, $client ?? new MockHttpClient());
    }

    pub

;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Contracts\HttpClient\ResponseInterface;

/**
 * @author Mickael Perraud <mikaelkael.fr@gmail.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\Telegram\Tests;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\Telegram\Reply\Markup\Button\InlineKeyboardButton;
use Symfony\Component\Notifier\Bridge\Telegram\Reply\Markup\InlineKeyboardMarkup;
use Symfony\Component\Notifier\Bridge\Telegram\TelegramOptions;

  $returnedOptions = $options->answerCallbackQuery('123', true, $cacheTime);

        $this->assertSame($options, $returnedOptions);
        $this->assertEquals(
            [
                'callback_query_id' => '123',
                'show_alert' => tr

final class TelegramOptionsTest extends TestCase
{
    #[DataProvider('validCacheTimeDataProvider')]
    public function testAnswerCallbackQueryWithCacheTime(int $cacheTime)
    {
        $options = new TelegramOptions();


 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\Telegram\Reply\Markup;

use Symfony\Component\Notifier\Bridge\Telegram\Reply\Markup\Button\KeyboardButton;

/**
 * @author Mihail Krasilnikov <mihail.krasilnikov.j@gmail.com>
 *
 * @see https://core.telegram.org/bots/api#replykeyboardmarkup
 */
final clas

*/
    public function keyboard(array $buttons): static
    {
        $buttons = array_map(static fn (KeyboardButton $button) => $button->toArray(), $buttons);

        $this->options['keyboard'][] = $buttons;

        return $this;
    }

    /**
     * @

s ReplyKeyboardMarkup extends AbstractTelegramReplyMarkup
{
    public function __construct()
    {
        $this->options['keyboard'] = [];
    }

    /**
     * @param KeyboardButton[] $buttons
     *
     * @return $this


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\Iqsms;

use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifie

\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Oleksandr Barabolia <alexandrbarabolya@gmail.com>
 */
final class IqsmsTransport extends AbstractTransport
{
    protected const HOST = 'api.iqsms.ru';

    public function __construct(
        pri

r\Message\SmsMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Ntfy;

use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Exception\UnsupportedOptionsException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\PushMessage;
use Symfony

erface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Mickael Perraud <mikaelkael.fr@gmail.com>
 */
final class NtfyTransport extends AbstractTransport
{
    protected const HOST = 'ntfy.sh';
    private ?string $user = null;
    pr

\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInt


buted with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Telegram;

use Symfony\Component\Notifier\Exception\MultipleExclusiveOptionsUsedException;
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\SentMessage;
use Symfony\Component\Notifier\Transport\Abstra

, send a message in Telegram with the user you want
 * and then execute curl 'https://api.telegram.org/bot%token%/getUpdates' | json_pp
 * command.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
final class TelegramTransport extends AbstractTransp

ctTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * To get the chat id


?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\Bridge\Pushy\Tests;

use Symfony\Component\Notifier\Bridge\Pushy\PushyTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;

final class PushyTransportFactoryTest extends AbstractTransportFactoryTestCase

Key@api.pushy.me'];
    }

    public static function supportsProvider(): iterable
    {
        yield [true, 'pushy://apiKey'];
        yield [false, 'somethingElse://apiKey'];
    }

    public static function unsupportedSchemeProvider(): iterable
    {

{
    public function createFactory(): PushyTransportFactory
    {
        return new PushyTransportFactory();
    }

    public static function createProvider(): iterable
    {
        yield ['pushy://api.pushy.me', 'pushy://api


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\Ntfy\Tests;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\Ntfy\NtfyOptions;

/**
 * @author Mickael Perraud <mikaelkael.fr@gmail.com>
 */
class NtfyOptionsTest extends TestCase
{
    public function testNtfyOptions()
    {
        $delay = (new \DateTime()

setTags(['tag1', 'tag2'])
            ->addTag('tag3')
            ->setDelay($delay)
            ->setActions([['action' => 'view', 'label' => 'View', 'url' => 'https://test.com']])
            ->addAction(['action' => 'http', 'label' => 'Open', 'url' =>

)->add(new \DateInterval('PT1M'));
        $ntfyOptions = (new NtfyOptions())
            ->setMessage('test message')
            ->setTitle('message title')
            ->setPriority(NtfyOptions::PRIORITY_URGENT)
            ->


     yield ['telegram://api.telegram.org', self::createTransport()];
        yield ['telegram://api.telegram.org?channel=testChannel', self::createTransport(null, 'testChannel')];
        yield ['telegram://api.telegram.org?sslmode=disable', self::createTransport(null, null, true)];
        yield ['telegram://api.telegram.org?channel=testChannel&sslmode=disable', self::createTransport(null, 'testChannel', true)];
    }

    public static function supportedMessagesProvider(): iterable
    {
        yield [ne

SendWithErrorResponseThrowsTransportException()
    {
        $this->expectException(TransportException::class);
        $this->expectExceptionMessageMatches('/post.+testDescription.+400/');

        $client = new MockHttpClient(new MockResponse(json_encod

w ChatMessage('Hello!')];
    }

    public static function unsupportedMessagesProvider(): iterable
    {
        yield [new SmsMessage('0611223344', 'Hello!')];
        yield [new DummyMessage()];
    }

    public function test


 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\Brevo\Tests;

use Symfony\Component\Notifier\Bridge\Brevo\BrevoTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
use Symfony\Component\Notifier\Test\MissingR

tFactory
    {
        return new BrevoTransportFactory();
    }

    public static function createProvider(): iterable
    {
        yield [
            'brevo://host.test?sender=0611223344',
            'brevo://apiKey@host.test?sender=0611223344',

equiredOptionTestTrait;

final class BrevoTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;
    use MissingRequiredOptionTestTrait;

    public function createFactory(): BrevoTranspor


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\MicrosoftTeams\Section;

use Symfony\Component\Notifier\Bridge\MicrosoftTeams\Action\ActionInterface;
use Symfony\Component\Notifier\Bridge\MicrosoftTeams\Section\Field\Activity;
use Symfony\Component\Notifier\Bridge\MicrosoftTeams\Section\Field\Fact;
use Symfony\Component\Notifie

sage-card-reference#section-fields
 */
final class Section implements SectionInterface
{
    private array $options = [];

    /**
     * @return $this
     */
    public function title(string $title): static
    {
        $this->options['title'] = $title;

r\Bridge\MicrosoftTeams\Section\Field\Image;

/**
 * @author Edouard Lescot <edouard.lescot@gmail.com>
 * @author Oskar Stark <oskarstark@googlemail.com>
 *
 * @see https://docs.microsoft.com/en-us/outlook/actionable-messages/mes


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\Bandwidth\Tests;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\Bandwidth\BandwidthOptions;

class BandwidthOptionsTest extends TestCase
{
    public function testBandwidthOptions()
    {
        $bandwidthOpt

            ->priority('test_priority');

        self::assertSame([
            'media' => ['foo'],
            'tag' => 'test_tag',
            'accountId' => 'test_account_id',
            'applicationId' => 'test_application_id',
            'expiratio

ions = (new BandwidthOptions())
            ->media(['foo'])
            ->tag('test_tag')
            ->accountId('test_account_id')
            ->applicationId('test_application_id')
            ->expiration('test_expiration')


/*
 * 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\Telegram\Reply\Markup\Button;

/**
 * @author Mihail Krasilnikov <mihail.krasilnikov.j@gmail.com>
 *
 * @see https://core.telegram.org/bots/api#keyboardbutton
 */
final class KeyboardButton extends AbstractKeyboardButton
{
    public fu

bool;

        return $this;
    }

    /**
     * @return $this
     */
    public function requestLocation(bool $bool): static
    {
        $this->options['request_location'] = $bool;

        return $this;
    }

    /**
     * @return $this
     */

nction __construct(string $text)
    {
        $this->options['text'] = $text;
    }

    /**
     * @return $this
     */
    public function requestContact(bool $bool): static
    {
        $this->options['request_contact'] = $


buted with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Lox24;

use Symfony\Component\Notifier\Exception\InvalidArgumentException;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use

ent\Exception\RedirectionExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author

Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
use Symfony\Contracts\HttpCli


 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\Lox24;

/*
 * 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.
 */

use Symfony\Comp

inal class Lox24TransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): Lox24Transport
    {
        $scheme = $dsn->getScheme();

        if (!\in_array($scheme, $this->getSupportedSchemes(), true)) {
            throw ne

onent\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Andrei Lebedev <andrew.lebedev@gmail.com>
 */
f


Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\Notifier\Bridge\Lox24\Lox24Options;
use Symfony\Component\Notifier\Bridge\Lox24\Lox24Transport;
use Symfony\Component\Notifier\Bridge\Lox24\Type;
use Symfony\Component\Notifier\Bridge\Lox24\VoiceLanguage;
use Symfony\Component\Notifier\Exception\InvalidArgumentException;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\

age\SmsMessage;
use Symfony\Component\Notifier\Test\TransportTestCase;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Andrei Lebedev <andrew.lebedev@gmail.com>
 */
class Lox24TransportTest extends TransportTestCase
{
    private cons

Message\ChatMessage;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\MessageOptionsInterface;
use Symfony\Component\Notifier\Message\PushMessage;
use Symfony\Component\Notifier\Mess


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Lox24\Webhook;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestMatcher\MethodRequestMatcher;
use Symfony\Component\HttpFoundation\RequestMatcherInterface;
use Symfony\Component\RemoteEvent\Event\Sms\SmsEvent;
use Symfony\Component\RemoteEvent\RemoteEvent;
use Symfony\Component\Webhook\Cli

ass Lox24RequestParser extends AbstractRequestParser
{
    protected function getRequestMatcher(): RequestMatcherInterface
    {
        return new MethodRequestMatcher('POST');
    }

    /**
     * @throws RejectWebhookException
     */
    protected fun

ent\AbstractRequestParser;
use Symfony\Component\Webhook\Exception\RejectWebhookException;

/**
 * @author Andrei Lebedev <andrew.lebedev@gmail.com>
 *
 * @see https://doc.lox24.eu/#section/Introduction/Notifications
 */
final cl


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\GatewayApi;

use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\No

mfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Piergiuseppe Longo <piergiuseppe.longo@gmail.com>
 */
final class GatewayApiTransport extends AbstractTransport
{
    protected const HOST = 'gatewayapi.com';

    public function __construct(

tifier\Message\SmsMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Sy


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\Bridge\GatewayApi\Tests;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\GatewayApi\GatewayApiOptions;

class GatewayApiOptionsTest extends TestCase
{
    public function testGatewayApiOptions()
    {
        $gatewayApiOptions = (new GatewayApiOptions())
            ->class('test_cl

            ->userRef('test_user_ref')
            ->label('test_label');

        self::assertSame([
            'class' => 'test_class',
            'callback_url' => 'test_callback_url',
            'userref' => 'test_user_ref',
            'label' =>

ass')
            ->callbackUrl('test_callback_url')


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\Bandwidth\Tests;

use Symfony\Component\Notifier\Bridge\Bandwidth\BandwidthTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
use Symfony\Component\Notifier\Test\MissingRequiredOptionT

ry
    {
        return new BandwidthTransportFactory();
    }

    public static function createProvider(): iterable
    {
        yield ['bandwidth://host.test?from=0611223344&account_id=account_id&application_id=application_id&priority=priority', 'bandw

estTrait;

final class BandwidthTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;
    use MissingRequiredOptionTestTrait;

    public function createFactory(): BandwidthTransportFacto


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Infobip;

use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notif

* @author Fabien Potencier <fabien@symfony.com>
 * @author Jérémy Romey <jeremy@free-agent.fr>
 */
final class InfobipTransport extends AbstractTransport
{
    public function __construct(
        #[\SensitiveParameter] private string $authToken,
        p

ier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**


 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\Bandwidth;

use Symfony\Component\Notifier\Message\MessageOptionsInterface;

/**
 * @author gnito-org <https://github.com/gnito-org>
 */
final class BandwidthOptions implements MessageOptionsInterface
{
    public function __construct(
        private arr

ptions['accountId'] = $accountId;

        return $this;
    }

    /**
     * @return $this
     */
    public function applicationId(string $applicationId): static
    {
        $this->options['applicationId'] = $applicationId;

        return $this;

ay $options = [],
    ) {
    }

    public function getRecipientId(): ?string
    {
        return null;
    }

    /**
     * @return $this
     */
    public function accountId(string $accountId): static
    {
        $this->o


 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\Bandwidth;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author gnito-org <https://github.com/gnito-org>
 */

    if (self::TRANSPORT_SCHEME !== $scheme) {
            throw new UnsupportedSchemeException($dsn, self::TRANSPORT_SCHEME, $this->getSupportedSchemes());
        }

        $username = $this->getUser($dsn);
        $password = $this->getPassword($dsn);

final class BandwidthTransportFactory extends AbstractTransportFactory
{
    private const TRANSPORT_SCHEME = 'bandwidth';

    public function create(Dsn $dsn): BandwidthTransport
    {
        $scheme = $dsn->getScheme();


 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\Infobip\Tests;

use Symfony\Component\Notifier\Bridge\Infobip\InfobipTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
use Symfony\Component\Notifier\Test\Mi

ipTransportFactory
    {
        return new InfobipTransportFactory();
    }

    public static function createProvider(): iterable
    {
        yield [
            'infobip://host.test?from=0611223344',
            'infobip://authtoken@host.test?from=061

ssingRequiredOptionTestTrait;

final class InfobipTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;
    use MissingRequiredOptionTestTrait;

    public function createFactory(): Infob


/*
 * 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\Brevo;

use Symfony\Component\Notifier\Message\MessageOptionsInterface;

final class BrevoOptions implements MessageOptionsInterface
{
    public function __construct(
        private array $options = [],
    ) {
    }

    public funct

    {
        $this->options['webUrl'] = $url;

        return $this;
    }

    /**
     * @return $this
     */
    public function type(string $type = 'transactional'): static
    {
        $this->options['type'] = $type;

        return $this;
    }

ion toArray(): array
    {
        return $this->options;
    }

    public function getRecipientId(): ?string
    {
        return null;
    }

    /**
     * @return $this
     */
    public function webUrl(string $url): static


/*
 * 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\Brevo;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Pierre Tanguy
 */
final class

xception($dsn, 'brevo', $this->getSupportedSchemes());
        }

        $apiKey = $this->getUser($dsn);
        $sender = $dsn->getRequiredOption('sender');
        $host = 'default' === $dsn->getHost() ? null : $dsn->getHost();
        $port = $dsn->get

BrevoTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): BrevoTransport
    {
        $scheme = $dsn->getScheme();

        if ('brevo' !== $scheme) {
            throw new UnsupportedSchemeE


 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\Telegram\Reply\Markup\Button;

/**
 * @author Mihail Krasilnikov <mihail.krasilnikov.j@gmail.com>
 *
 * @see https://core.telegram.org/bots/api#inlinekeyboardbutton
 */
final class InlineKeyboardButton extends AbstractKeyboardButton
{
    public function

is;
    }

    /**
     * @return $this
     */
    public function loginUrl(string $url): static
    {
        $this->options['login_url']['url'] = $url;

        return $this;
    }

    /**
     * @return $this
     */
    public function loginUrlForwar

__construct(string $text = '')
    {
        $this->options['text'] = $text;
    }

    /**
     * @return $this
     */
    public function url(string $url): static
    {
        $this->options['url'] = $url;

        return $th


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\Lox24\Tests;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\Lox24\Lox24Options;
use Symfony\Component\Notifier\Bridge\Lox24\Type;
use Symfony\Component\Notifier\Bridge\Lox24\VoiceLanguage;

/**
 * @author Andrei Lebedev <andrew.lebedev@gmail.com>
 */
class

->toArray()['delivery_at']);
    }

    public function testDeliveryWithNull()
    {
        $options = (new Lox24Options())->deliveryAt(null);
        $this->assertSame(0, $options->toArray()['delivery_at']);
    }

    public function testVoiceLangAuto()

Lox24OptionsTest extends TestCase
{
    public function testDeliveryAtWithNotNull()
    {
        $options = (new Lox24Options())->deliveryAt((new \DateTimeImmutable())->setTimestamp(123));
        $this->assertSame(123, $options


ier\Bridge\Lox24\Webhook\Lox24RequestParser;
use Symfony\Component\RemoteEvent\Event\Sms\SmsEvent;
use Symfony\Component\RemoteEvent\RemoteEvent;
use Symfony\Component\Webhook\Exception\RejectWebhookException;

/**
 * @author Andrei Lebedev <andrew.lebedev@gmail.com>
 */
class Lox24RequestParserTest extends TestCase
{
    private Lox24RequestParser $parser;

    protected function setUp(): void
    {
        $this->parser = new Lox24RequestParser();
    }

    public function testMissingBasicPayloadStructur

ms.delivery']);
        $this->parser->parse($request, '');
    }

    public function testSmsDeliveryMissingMsgId()
    {
        $this->expectException(RejectWebhookException::class);
        $this->expectExceptionMessage('The required field "id" is miss

e()
    {
        $this->expectException(RejectWebhookException::class);
        $this->expectExceptionMessage('The required fields "id", "data" are missing from the payload.');

        $request = $this->getRequest(['name' => 's


 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\GatewayApi;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Piergiuseppe Longo <piergiusepp

scheme) {
            throw new UnsupportedSchemeException($dsn, 'gatewayapi', $this->getSupportedSchemes());
        }

        $authToken = $this->getUser($dsn);
        $from = $dsn->getRequiredOption('from');
        $host = 'default' === $dsn->getHost

e.longo@gmail.com>
 */
final class GatewayApiTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): GatewayApiTransport
    {
        $scheme = $dsn->getScheme();

        if ('gatewayapi' !== $


 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\GatewayApi\Tests;

use Symfony\Component\Notifier\Bridge\GatewayApi\GatewayApiTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
use Symfony\Component\Notifie

actoryTestCase
{
    use IncompleteDsnTestTrait;
    use MissingRequiredOptionTestTrait;

    public function createFactory(): GatewayApiTransportFactory
    {
        return new GatewayApiTransportFactory();
    }

    public static function createProvide

r\Test\MissingRequiredOptionTestTrait;

/**
 * @author Piergiuseppe Longo <piergiuseppe.longo@gmail.com>
 * @author Oskar Stark <oskarstark@googlemail.com>
 */
final class GatewayApiTransportFactoryTest extends AbstractTransportF


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Bandwidth;

use Symfony\Component\Notifier\Exception\InvalidArgumentException;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfo

terface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author gnito-org <https://github.com/gnito-org>
 */
final class BandwidthTransport extends AbstractTransport
{
    protected const HOST = 'messaging.bandwidth.com';

    public functio

ny\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionIn


 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\Infobip\Tests;

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\Notifier\Bridge\Infobip\InfobipTransport;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfon

lic static function createTransport(?HttpClientInterface $client = null): InfobipTransport
    {
        return (new InfobipTransport('authtoken', '0611223344', $client ?? new MockHttpClient()))->setHost('host.test');
    }

    public static function toSt

y\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;

final class InfobipTransportTest extends TransportTestCase
{
    pub


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\Lox24;

use Symfony\Component\Notifier\Message\MessageOptionsInterface;

/**
 * @author Andrei Lebedev <andrew.lebedev@gmail.com>
 */
final class Lox24Options implements MessageOptionsInterface
{
    public function __construct(
        private array $options = [],
    ) {
    }

ull or not set, the message will be sent immediately.
     */
    public function deliveryAt(?\DateTimeInterface $deliveryAt): self
    {
        $this->options['delivery_at'] = $deliveryAt ? $deliveryAt->getTimestamp() : 0;

        return $this;
    }

    public function toArray(): array
    {
        return $this->options;
    }

    public function getRecipientId(): ?string
    {
        return null;
    }

    /**
     * DateTime object of SMS the delivery time.
     * If N


 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\GatewayApi;

use Symfony\Component\Notifier\Message\MessageOptionsInterface;

/**
 * @author gnito-org <https://github.com/gnito-org>
 */
final class GatewayApiOptions implements MessageOptionsInterface
{
    public function __construct(

this->options['class'] = $class;

        return $this;
    }

    /**
     * @return $this
     */
    public function userRef(string $userRef): static
    {
        $this->options['userref'] = $userRef;

        return $this;
    }

    /**
     * @retur

    private array $options = [],
    ) {
    }

    public function getRecipientId(): ?string
    {
        return null;
    }

    /**
     * @return $this
     */
    public function class(string $class): static
    {
        $


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\GatewayApi\Tests;

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\Notifier\Bridge\GatewayApi\GatewayApiOptions;
use Symfony\Component\Notifier\Bridge\GatewayApi\GatewayApiTransport;
use Symfony\Compone

ransport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Piergiuseppe Longo <piergiuseppe.longo@gmail.com>
 * @author Oskar Stark <oskarstark@googlemail.com>
 */
final class GatewayApiTransportTest extends TransportTestC

nt\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\T


 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\Infobip;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author Fabien Potencier <fabien@symfony.c

    if ('infobip' !== $scheme) {
            throw new UnsupportedSchemeException($dsn, 'infobip', $this->getSupportedSchemes());
        }

        $authToken = $this->getUser($dsn);
        $from = $dsn->getRequiredOption('from');
        $host = $dsn->g

om>
 * @author Jérémy Romey <jeremy@free-agent.fr>
 */
final class InfobipTransportFactory extends AbstractTransportFactory
{
    public function create(Dsn $dsn): InfobipTransport
    {
        $scheme = $dsn->getScheme();


 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\Lox24\Tests;

use Symfony\Component\Notifier\Bridge\Lox24\Lox24TransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
use Symfony\Component\Notifier\Test\MissingR

    use IncompleteDsnTestTrait;
    use MissingRequiredOptionTestTrait;

    public static function supportsProvider(): iterable
    {
        yield [true, 'lox24://123456:aaaabbbbbbccccccdddddeeee@default?from=0611223344'];
        yield [false, 'somethin

equiredOptionTestTrait;
use Symfony\Component\Notifier\Transport\TransportFactoryInterface;

/**
 * @author Andrei Lebedev <andrew.lebedev@gmail.com>
 */
class Lox24TransportFactoryTest extends AbstractTransportFactoryTestCase
{


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Bandwidth\Tests;

use PHPUnit\Framework\Attributes\DataProvider;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\Notifier\Bridge\Bandwidth\BandwidthOptions;
use Symfony\Component\Notifier\Bridge\Bandwidth\BandwidthTransport;
use Symfony\Component\Notifi

ests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Contracts\HttpClient\ResponseInterface;

final class BandwidthTransportTest extends TransportTestCase
{
    public static function createTransport(?HttpClientInt

er\Exception\InvalidArgumentException;
use Symfony\Component\Notifier\Message\ChatMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\T


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\Brevo\Tests;

use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\Notifier\Bridge\Brevo\BrevoTransport;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Message\Ch

e;
use Symfony\Contracts\HttpClient\ResponseInterface;

final class BrevoTransportTest extends TransportTestCase
{
    public static function createTransport(?HttpClientInterface $client = null): BrevoTransport
    {
        return (new BrevoTransport('api

atMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Test\TransportTestCase;
use Symfony\Component\Notifier\Tests\Transport\DummyMessage;
use Symfony\Contracts\HttpClient\HttpClientInterfac


 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\Plivo;

use Symfony\Component\Notifier\Message\MessageOptionsInterface;

/**
 * @author gnito-org <https://github.com/gnito-org>
 */
final class PlivoOptions implements MessageOptionsInterface
{
    public function __construct(
        private array $opti

        return $this;
    }

    /**
     * @return $this
     */
    public function mediaUrls(string $mediaUrls): static
    {
        $this->options['media_urls'] = $mediaUrls;

        return $this;
    }

    /**
     * @return $this
     */
    publ

ons = [],
    ) {
    }

    public function getRecipientId(): ?string
    {
        return null;
    }

    /**
     * @return $this
     */
    public function log(bool $log): static
    {
        $this->options['log'] = $log;


 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\Plivo;

use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\Notifier\Transport\Dsn;

/**
 * @author gnito-org <https://github.com/gnito-

 if (self::TRANSPORT_SCHEME !== $scheme) {
            throw new UnsupportedSchemeException($dsn, self::TRANSPORT_SCHEME, $this->getSupportedSchemes());
        }

        $authId = $this->getUser($dsn);
        $authToken = $this->getPassword($dsn);

org>
 */
final class PlivoTransportFactory extends AbstractTransportFactory
{
    private const TRANSPORT_SCHEME = 'plivo';

    public function create(Dsn $dsn): PlivoTransport
    {
        $scheme = $dsn->getScheme();


 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\Plivo\Tests;

use Symfony\Component\Notifier\Bridge\Plivo\PlivoTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
use Symfony\Component\Notifier\Test\MissingR

tFactory
    {
        return new PlivoTransportFactory();
    }

    public static function createProvider(): iterable
    {
        yield ['plivo://host.test?from=0611223344', 'plivo://authId:authToken@host.test?from=0611223344'];
    }

    public stati

equiredOptionTestTrait;

final class PlivoTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;
    use MissingRequiredOptionTestTrait;

    public function createFactory(): PlivoTranspor


 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\ContactEveryone;

use Symfony\Component\Notifier\Message\MessageOptionsInterface;

/**
 * @author gnito-org <https://github.com/gnito-org>
 *
 * @see https://ceo-be.multimediabs.com/attachments/hosted/lightApiManualsFR
 */
final class ContactEveryoneOptio

this
     */
    public function diffusionName(string $diffusionName): static
    {
        $this->options['diffusionname'] = $diffusionName;

        return $this;
    }

    /**
     * @return $this
     */
    public function category(string $category):

ns implements MessageOptionsInterface
{
    public function __construct(
        private array $options = [],
    ) {
    }

    public function getRecipientId(): ?string
    {
        return null;
    }

    /**
     * @return $


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\ContactEveryone;

use Symfony\Component\Notifier\Exception\InvalidArgumentException;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use

tionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Franck Ranaivo-Harisoa <franckranaivo@gmail.com>
 */
final class ContactEveryoneTransport extends AbstractTransport
{
    protected const HOST = 'contact-everyone.orange-b

 Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExcep


 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\ContactEveryone\Tests;

use Symfony\Component\Notifier\Bridge\ContactEveryone\ContactEveryoneTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;

final class C

Factory();
    }

    public static function createProvider(): iterable
    {
        yield [
            'contact-everyone://host.test',
            'contact-everyone://token@host.test',
        ];

        yield [
            'contact-everyone://host.tes

ontactEveryoneTransportFactoryTest extends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;

    public function createFactory(): ContactEveryoneTransportFactory
    {
        return new ContactEveryoneTransport


buted with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\OvhCloud;

use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Transport\AbstractTransport;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use

ransport
{
    protected const HOST = 'eu.api.ovh.com';

    private ?string $sender = null;
    private bool $noStopClause = false;

    public function __construct(
        #[\SensitiveParameter] private string $applicationKey,
        #[\SensitiveParame

Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
 * @author Thomas Ferney <thomas.ferney@gmail.com>
 */
final class OvhCloudTransport extends AbstractT


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\OvhCloud\Tests;

use Symfony\Component\Notifier\Bridge\OvhCloud\OvhCloudTransportFactory;
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
use Symfony\Component\Notifier\Test\MissingRequiredOptionTestTrait;

final class OvhCloudTransportFactoryTest ex

    }

    public static function createProvider(): iterable
    {
        yield [
            'ovhcloud://host.test?service_name=serviceName',
            'ovhcloud://key:secret@host.test?consumer_key=consumerKey&service_name=serviceName',
        ];

tends AbstractTransportFactoryTestCase
{
    use IncompleteDsnTestTrait;
    use MissingRequiredOptionTestTrait;

    public function createFactory(): OvhCloudTransportFactory
    {
        return new OvhCloudTransportFactory();


 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\MicrosoftTeams;

use Symfony\Component\Notifier\Bridge\MicrosoftTeams\Action\ActionInterface;
use Symfony\Component\Notifier\Bridge\MicrosoftTeams\Section\Section;
use Symfony\Component\Notifier\Bridge\MicrosoftTeams\Section\SectionInterface;
use Symfony\Component\Notifier\Exception\InvalidArgumentException;
use Symfony\Component\

ocs.microsoft.com/en-us/outlook/actionable-messages/message-card-reference
 */
final class MicrosoftTeamsOptions implements MessageOptionsInterface
{
    private const MAX_ACTIONS = 4;

    public function __construct(
        private array $options = [],

Notifier\Message\MessageOptionsInterface;
use Symfony\Component\Notifier\Notification\Notification;

/**
 * @author Edouard Lescot <edouard.lescot@gmail.com>
 * @author Oskar Stark <oskarstark@googlemail.com>
 *
 * @see https://d


 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\MicrosoftTeams;

use Symfony\Component\Notifier\Exception\IncompleteDsnException;
use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
use Symfony\Component\No

ion create(Dsn $dsn): MicrosoftTeamsTransport
    {
        $scheme = $dsn->getScheme();

        if ('microsoftteams' !== $scheme) {
            throw new UnsupportedSchemeException($dsn, 'microsoftteams', $this->getSupportedSchemes());
        }

tifier\Transport\Dsn;

/**
 * @author Edouard Lescot <edouard.lescot@gmail.com>
 * @author Oskar Stark <oskarstark@googlemail.com>
 */
final class MicrosoftTeamsTransportFactory extends AbstractTransportFactory
{
    public funct