prefix stringlengths 512 512 | suffix stringlengths 256 256 | middle stringlengths 14 229 | meta dict |
|---|---|---|---|
buted with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailgun\Tests\Transport;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\JsonMockResponse;
use Symfony\Component\Mailer\B... | public function testToString(MailgunHttpTransport $transport, string $expected)
{
$this->assertSame($expected, (string) $transport);
}
public static function getTransportData()
{
return [
[
n | ader\TagHeader;
use Symfony\Component\Mime\Address;
use Symfony\Component\Mime\Email;
use Symfony\Contracts\HttpClient\ResponseInterface;
class MailgunHttpTransportTest extends TestCase
{
#[DataProvider('getTransportData')]
| {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunHttpTransportTest.php",
"language": "php",
"file_size": 5824,
"cut_index": 716,
"middle_length": 229
} |
part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailgun\Tests\Transport;
use PHPUnit\Framework\TestCase;
use Sym... | dTextHeader('foo', 'bar');
$email->getHeaders()->add(new TagHeader('password-reset'));
$email->getHeaders()->add(new MetadataHeader('Color', 'blue'));
$email->getHeaders()->add(new MetadataHeader('Client-ID', '12345'));
$tr | me\Email;
/**
* @author Kevin Bond <kevinbond@gmail.com>
*/
class MailgunSmtpTransportTest extends TestCase
{
public function testTagAndMetadataHeaders()
{
$email = new Email();
$email->getHeaders()->ad | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunSmtpTransportTest.php",
"language": "php",
"file_size": 1659,
"cut_index": 537,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailgun\Tests\Transport;
use Psr\Log\NullLogger;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\Mailer\Bridge\Mailgun... | nsport\Dsn;
use Symfony\Component\Mailer\Transport\TransportFactoryInterface;
class MailgunTransportFactoryTest extends AbstractTransportFactoryTestCase
{
use IncompleteDsnTestTrait;
public function getFactory(): TransportFactoryInterface
{
| ony\Component\Mailer\Bridge\Mailgun\Transport\MailgunTransportFactory;
use Symfony\Component\Mailer\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Mailer\Test\IncompleteDsnTestTrait;
use Symfony\Component\Mailer\Tra | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunTransportFactoryTest.php",
"language": "php",
"file_size": 4242,
"cut_index": 614,
"middle_length": 229
} |
ony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailgun\Tests\Webhook;
use Symfony\Component\Mailer\Bridge\Mailgun\RemoteEvent\MailgunPayloadConverter;
use Symfony\Component\Mailer\... | protected function createRequestParser(): RequestParserInterface
{
return new MailgunRequestParser(new MailgunPayloadConverter());
}
protected function getSecret(): string
{
return 'key-0p6mqbf74lb20gzq9f4dhpn9rg3zyk26' | tParserTest extends AbstractRequestParserTestCase
{
| {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Webhook/MailgunRequestParserTest.php",
"language": "php",
"file_size": 924,
"cut_index": 606,
"middle_length": 52
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailgun\RemoteEvent;
use Symfony\Component\RemoteEvent\Event\Mailer\AbstractMailerEvent;
use Symfony\Component\RemoteEvent\Event\Mailer\Maile... | vering to unsubscribed address
607, // Not delivering to a user who marked your messages as spam
625, // Poor mailing list quality
];
public function convert(array $payload): AbstractMailerEvent
{
if (\in_array($payload | rterInterface;
final class MailgunPayloadConverter implements PayloadConverterInterface
{
private const MAILGUN_SPECIFIC_DROPPED_CODES = [
605, // Not delivering to previously bounced address
606, // Not deli | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailgun/RemoteEvent/MailgunPayloadConverter.php",
"language": "php",
"file_size": 3604,
"cut_index": 614,
"middle_length": 229
} |
ge.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailgun\Webhook;
use Symfony\Component\HttpFoundation\ChainRequestMatcher;
use Symfony\Com... | Event\Mailer\AbstractMailerEvent;
use Symfony\Component\RemoteEvent\Exception\ParseException;
use Symfony\Component\Webhook\Client\AbstractRequestParser;
use Symfony\Component\Webhook\Exception\RejectWebhookException;
final class MailgunRequestParser exte | omponent\HttpFoundation\RequestMatcherInterface;
use Symfony\Component\Mailer\Bridge\Mailgun\RemoteEvent\MailgunPayloadConverter;
use Symfony\Component\Mailer\Exception\InvalidArgumentException;
use Symfony\Component\RemoteEvent\ | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailgun/Webhook/MailgunRequestParser.php",
"language": "php",
"file_size": 2707,
"cut_index": 563,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailomat\Transport;
use Psr\EventDispatcher\EventDispatcherInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\Mailer\Envelope;
use... | terface;
use Symfony\Contracts\HttpClient\ResponseInterface;
final class MailomatApiTransport extends AbstractApiTransport
{
private const HOST = 'api.mailomat.swiss';
public function __construct(
#[\SensitiveParameter] private readonly s | dress;
use Symfony\Component\Mime\Email;
use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientIn | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailomat/Transport/MailomatApiTransport.php",
"language": "php",
"file_size": 5007,
"cut_index": 614,
"middle_length": 229
} |
is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailomat\Transport;
use Psr\EventDispatcher\EventDispatcherInt... | rd, ?EventDispatcherInterface $dispatcher = null, ?LoggerInterface $logger = null)
{
parent::__construct('smtp.mailomat.cloud', 587, false, $dispatcher, $logger);
$this->setUsername($username);
$this->setPassword($password);
| ing $username, #[\SensitiveParameter] string $passwo | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailomat/Transport/MailomatSmtpTransport.php",
"language": "php",
"file_size": 849,
"cut_index": 535,
"middle_length": 52
} |
part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailomat\Transport;
use Symfony\Component\Mailer\Exception\Unsup... | ost = 'default' === $dsn->getHost() ? null : $dsn->getHost();
$port = $dsn->getPort();
return (new MailomatApiTransport($this->getUser($dsn), $this->client, $this->dispatcher, $this->logger))
->setHost($host)
| final class MailomatTransportFactory extends AbstractTransportFactory
{
public function create(Dsn $dsn): TransportInterface
{
$schema = $dsn->getScheme();
if ('mailomat+api' === $schema) {
$h | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailomat/Transport/MailomatTransportFactory.php",
"language": "php",
"file_size": 1539,
"cut_index": 537,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailomat\Tests\Transport;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\JsonMockResponse;
use Symfony\Component\Mailer\... | string $expected)
{
$this->assertSame($expected, (string) $transport);
}
public static function getTransportData(): iterable
{
yield [
new MailomatApiTransport(self::KEY),
'mailomat+api://api.mailom | \Contracts\HttpClient\ResponseInterface;
class MailomatApiTransportTest extends TestCase
{
private const KEY = 'K3Y';
#[DataProvider('getTransportData')]
public function testToString(MailomatApiTransport $transport, | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailomat/Tests/Transport/MailomatApiTransportTest.php",
"language": "php",
"file_size": 6068,
"cut_index": 716,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailomat\Tests\Transport;
use Psr\Log\NullLogger;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\Mailer\Bridge\Mailom... | terface;
class MailomatTransportFactoryTest extends AbstractTransportFactoryTestCase
{
use IncompleteDsnTestTrait;
public function getFactory(): TransportFactoryInterface
{
return new MailomatTransportFactory(null, new MockHttpClient( | ;
use Symfony\Component\Mailer\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Mailer\Test\IncompleteDsnTestTrait;
use Symfony\Component\Mailer\Transport\Dsn;
use Symfony\Component\Mailer\Transport\TransportFactoryIn | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailomat/Tests/Transport/MailomatTransportFactoryTest.php",
"language": "php",
"file_size": 3194,
"cut_index": 614,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailomat\Tests\Webhook;
use PHPUnit\Framework\Attributes\DataProvider;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Ma... | ET = 'NgD3IyUA0oLfkM5IyL8tdMNJeIYeBXOpAcnulN1du1aqh3jFbo766lKdJvMePUy5';
private const EVENT_ID = '1d958822-0934-4c6a-abc8-5defec4baa64';
private const EVENT = 'delivered';
protected function createRequestParser(): RequestParserInterface
{ | ce;
use Symfony\Component\Webhook\Exception\RejectWebhookException;
use Symfony\Component\Webhook\Test\AbstractRequestParserTestCase;
class MailomatRequestParserTest extends AbstractRequestParserTestCase
{
private const SECR | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailomat/Tests/Webhook/MailomatRequestParserTest.php",
"language": "php",
"file_size": 4250,
"cut_index": 614,
"middle_length": 229
} |
ge.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailomat\RemoteEvent;
use Symfony\Component\RemoteEvent\Event\Mailer\AbstractMailerEvent;
... | n_array($payload['eventType'], ['accepted', 'not_accepted', 'delivered', 'failure_tmp', 'failure_perm'], true)) {
$name = match ($payload['eventType']) {
'accepted' => MailerDeliveryEvent::RECEIVED,
'not_accepted | tion;
use Symfony\Component\RemoteEvent\PayloadConverterInterface;
final class MailomatPayloadConverter implements PayloadConverterInterface
{
public function convert(array $payload): AbstractMailerEvent
{
if (\i | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailomat/RemoteEvent/MailomatPayloadConverter.php",
"language": "php",
"file_size": 2246,
"cut_index": 563,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailomat\Webhook;
use Symfony\Component\HttpFoundation\ChainRequestMatcher;
use Symfony\Component\HttpFoundation\HeaderBag;
use Symfony\Compo... | ler\Exception\InvalidArgumentException;
use Symfony\Component\RemoteEvent\Event\Mailer\AbstractMailerEvent;
use Symfony\Component\RemoteEvent\Exception\ParseException;
use Symfony\Component\Webhook\Client\AbstractRequestParser;
use Symfony\Component\Webhoo | ponent\HttpFoundation\RequestMatcher\MethodRequestMatcher;
use Symfony\Component\HttpFoundation\RequestMatcherInterface;
use Symfony\Component\Mailer\Bridge\Mailomat\RemoteEvent\MailomatPayloadConverter;
use Symfony\Component\Mai | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailomat/Webhook/MailomatRequestParser.php",
"language": "php",
"file_size": 4026,
"cut_index": 614,
"middle_length": 229
} |
elope;
use Symfony\Component\Mailer\Exception\HttpTransportException;
use Symfony\Component\Mailer\SentMessage;
use Symfony\Component\Mailer\Transport\AbstractApiTransport;
use Symfony\Component\Mime\Address;
use Symfony\Component\Mime\Email;
use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
use Sy... | aram string $resourceName The endpoint API URL to which to POST emails to Azure https://{acsResourceName}.communication.azure.com/
* @param bool $disableTracking Indicates whether user engagement tracking should be disabled
* @param string $ | iTransport extends AbstractApiTransport
{
private const HOST = '%s.communication.azure.com';
/**
* @param string $key User Access Key from Azure Communication Service (Primary or Secondary key)
* @p | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Azure/Transport/AzureApiTransport.php",
"language": "php",
"file_size": 9895,
"cut_index": 921,
"middle_length": 229
} |
This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Azure\Transport;
use Symfony\Component\Mailer\Excep... | ure'], true)) {
throw new UnsupportedSchemeException($dsn, 'azure', $this->getSupportedSchemes());
}
$user = $this->getUser($dsn); // resourceName
$password = $this->getPassword($dsn); // apiKey
$host = 'default | terface;
final class AzureTransportFactory extends AbstractTransportFactory
{
public function create(Dsn $dsn): TransportInterface
{
$scheme = $dsn->getScheme();
if (!\in_array($scheme, ['azure+api', 'az | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Azure/Transport/AzureTransportFactory.php",
"language": "php",
"file_size": 1470,
"cut_index": 524,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Azure\Tests\Transport;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\JsonMockResponse;
use Symfony\Component\Mailer\Bri... | Data')]
public function testToString(AzureApiTransport $transport, string $expected)
{
$this->assertSame($expected, (string) $transport);
}
public static function getTransportData(): array
{
return [
[
| ponent\Mime\Address;
use Symfony\Component\Mime\Email;
use Symfony\Component\Mime\Part\DataPart;
use Symfony\Contracts\HttpClient\ResponseInterface;
class AzureApiTransportTest extends TestCase
{
#[DataProvider('getTransport | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Azure/Tests/Transport/AzureApiTransportTest.php",
"language": "php",
"file_size": 6512,
"cut_index": 716,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Azure\Tests\Transport;
use Psr\Log\NullLogger;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\Mailer\Bridge\Azure\Tra... | IncompleteDsnTestTrait;
public function getFactory(): TransportFactoryInterface
{
return new AzureTransportFactory(null, new MockHttpClient(), new NullLogger());
}
public static function supportsProvider(): iterable
{
| ailer\Test\IncompleteDsnTestTrait;
use Symfony\Component\Mailer\Transport\Dsn;
use Symfony\Component\Mailer\Transport\TransportFactoryInterface;
class AzureTransportFactoryTest extends AbstractTransportFactoryTestCase
{
use | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Azure/Tests/Transport/AzureTransportFactoryTest.php",
"language": "php",
"file_size": 3061,
"cut_index": 614,
"middle_length": 229
} |
ackage.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Google\Transport;
use Psr\EventDispatcher\EventDispatcherInterface;
use Psr\Log\Logger... | ord, ?EventDispatcherInterface $dispatcher = null, ?LoggerInterface $logger = null)
{
parent::__construct('smtp.gmail.com', 465, true, $dispatcher, $logger);
$this->setUsername($username);
$this->setPassword($password);
}
} | ring $username, #[\SensitiveParameter] string $passw | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Google/Transport/GmailSmtpTransport.php",
"language": "php",
"file_size": 868,
"cut_index": 559,
"middle_length": 52
} |
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Google\Transport;
use Symfony\Component\Maile... | ray($dsn->getScheme(), $this->getSupportedSchemes(), true)) {
return new GmailSmtpTransport($this->getUser($dsn), $this->getPassword($dsn), $this->dispatcher, $this->logger);
}
throw new UnsupportedSchemeException($dsn, 'gmail' | sportInterface;
/**
* @author Konstantin Myakshin <molodchick@gmail.com>
*/
final class GmailTransportFactory extends AbstractTransportFactory
{
public function create(Dsn $dsn): TransportInterface
{
if (\in_ar | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Google/Transport/GmailTransportFactory.php",
"language": "php",
"file_size": 1164,
"cut_index": 518,
"middle_length": 229
} |
ge.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Google\Tests\Transport;
use Psr\Log\NullLogger;
use Symfony\Component\HttpClient\MockHttpC... | est extends AbstractTransportFactoryTestCase
{
use IncompleteDsnTestTrait;
public function getFactory(): TransportFactoryInterface
{
return new GmailTransportFactory(null, new MockHttpClient(), new NullLogger());
}
public stat | stractTransportFactoryTestCase;
use Symfony\Component\Mailer\Test\IncompleteDsnTestTrait;
use Symfony\Component\Mailer\Transport\Dsn;
use Symfony\Component\Mailer\Transport\TransportFactoryInterface;
class GmailTransportFactoryT | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Google/Tests/Transport/GmailTransportFactoryTest.php",
"language": "php",
"file_size": 2625,
"cut_index": 563,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailchimp\Transport;
use Psr\EventDispatcher\EventDispatcherInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\Mailer\Envelope;
use Symfony\Component\Mailer\Exception\HttpTransportException;
use Symfony\Component\Mailer\Header\Metad... | ent\ResponseInterface;
/**
* @author Kevin Verschaeve
*/
class MandrillApiTransport extends AbstractApiTransport
{
private const HOST = 'mandrillapp.com';
public function __construct(
#[\SensitiveParameter] private string $key,
| l;
use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Contracts\HttpCli | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailchimp/Transport/MandrillApiTransport.php",
"language": "php",
"file_size": 6106,
"cut_index": 716,
"middle_length": 229
} |
part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailchimp\Transport;
use Symfony\Component\Mailer\Envelope;
use ... | essage) {
$message = clone $message;
$this->addMandrillHeaders($message);
}
return parent::send($message, $envelope);
}
private function addMandrillHeaders(Message $message): void
{
$headers = $ | nt\Mime\RawMessage;
/**
* @author Kevin Bond <kevinbond@gmail.com>
*/
trait MandrillHeadersTrait
{
public function send(RawMessage $message, ?Envelope $envelope = null): ?SentMessage
{
if ($message instanceof M | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailchimp/Transport/MandrillHeadersTrait.php",
"language": "php",
"file_size": 1699,
"cut_index": 537,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailchimp\Transport;
use Psr\EventDispatcher\EventDispatcherInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\Mailer\Exception\Ht... | uthor Kevin Verschaeve
*/
class MandrillHttpTransport extends AbstractHttpTransport
{
use MandrillHeadersTrait;
private const HOST = 'mandrillapp.com';
public function __construct(
#[\SensitiveParameter] private string $key,
| nt\Exception\DecodingExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Contracts\HttpClient\ResponseInterface;
/**
* @a | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailchimp/Transport/MandrillHttpTransport.php",
"language": "php",
"file_size": 3193,
"cut_index": 614,
"middle_length": 229
} |
he Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailchimp\Transport;
use Psr\EventDispatcher\EventDispatcherInterface;
use... | g $username, #[\SensitiveParameter] string $password, ?EventDispatcherInterface $dispatcher = null, ?LoggerInterface $logger = null)
{
parent::__construct('smtp.mandrillapp.com', 587, false, $dispatcher, $logger);
$this->setUsername($u | HeadersTrait;
public function __construct(strin | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailchimp/Transport/MandrillSmtpTransport.php",
"language": "php",
"file_size": 912,
"cut_index": 547,
"middle_length": 52
} |
part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailchimp\Transport;
use Symfony\Component\Mailer\Exception\Unsu... | me();
$user = $this->getUser($dsn);
$host = 'default' === $dsn->getHost() ? null : $dsn->getHost();
$port = $dsn->getPort();
if ('mandrill+api' === $scheme) {
return (new MandrillApiTransport($user, $this->clien |
/**
* @author Konstantin Myakshin <molodchick@gmail.com>
*/
final class MandrillTransportFactory extends AbstractTransportFactory
{
public function create(Dsn $dsn): TransportInterface
{
$scheme = $dsn->getSche | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailchimp/Transport/MandrillTransportFactory.php",
"language": "php",
"file_size": 1821,
"cut_index": 537,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailchimp\Tests\Transport;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\JsonMockResponse;
use Symfony\Component\Mailer... |
{
#[DataProvider('getTransportData')]
public function testToString(MandrillApiTransport $transport, string $expected)
{
$this->assertSame($expected, (string) $transport);
}
public static function getTransportData()
{
| dataHeader;
use Symfony\Component\Mailer\Header\TagHeader;
use Symfony\Component\Mime\Address;
use Symfony\Component\Mime\Email;
use Symfony\Contracts\HttpClient\ResponseInterface;
class MandrillApiTransportTest extends TestCase | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillApiTransportTest.php",
"language": "php",
"file_size": 7182,
"cut_index": 716,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailchimp\Tests\Transport;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpClient\Mo... | ponseInterface;
class MandrillHttpTransportTest extends TestCase
{
#[DataProvider('getTransportData')]
public function testToString(MandrillHttpTransport $transport, string $expected)
{
$this->assertSame($expected, (string) $transport) | HttpTransportException;
use Symfony\Component\Mailer\Header\MetadataHeader;
use Symfony\Component\Mailer\Header\TagHeader;
use Symfony\Component\Mime\Address;
use Symfony\Component\Mime\Email;
use Symfony\Contracts\HttpClient\Res | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillHttpTransportTest.php",
"language": "php",
"file_size": 5055,
"cut_index": 614,
"middle_length": 229
} |
part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailchimp\Tests\Transport;
use PHPUnit\Framework\TestCase;
use S... | Headers()->add(new TagHeader('password-reset,user'));
$email->getHeaders()->add(new TagHeader('another'));
$email->getHeaders()->add(new MetadataHeader('Color', 'blue'));
$email->getHeaders()->add(new MetadataHeader('Client-ID', '12 | nt\Mime\Email;
class MandrillSmtpTransportTest extends TestCase
{
public function testTagAndMetadataHeaders()
{
$email = new Email();
$email->getHeaders()->addTextHeader('foo', 'bar');
$email->get | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillSmtpTransportTest.php",
"language": "php",
"file_size": 1675,
"cut_index": 537,
"middle_length": 229
} |
ymfony\Component\RemoteEvent\Event\Mailer\MailerDeliveryEvent;
$wh = new MailerDeliveryEvent(MailerDeliveryEvent::BOUNCE, '<202305311437.85220493321@smtp-relay.mailin.fr>', json_decode(file_get_contents(str_replace('.php', '.json', __FILE__)), true, flags: JSON_THROW_ON_ERROR));
$wh->setRecipientEmail('example@gmail.c... | 550-5.1.1 double-checking the recipient's email address for typos or\n 550-5.1.1 unnecessary spaces. Learn more at\n 550 5.1.1 https://support.google.com/mail/?p=NoSuchUser g14-20020a5d698e000000b0030aefbb8608si2668200wru.496 - gsmtp");
return $wh | . Please try\n | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Brevo/Tests/Webhook/Fixtures/hard_bounce.php",
"language": "php",
"file_size": 796,
"cut_index": 524,
"middle_length": 14
} |
ge.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Brevo\RemoteEvent;
use Symfony\Component\RemoteEvent\Event\Mailer\AbstractMailerEvent;
use... | y($payload['event'], ['request', 'deferred', 'delivered', 'soft_bounce', 'hard_bounce', 'invalid_email', 'blocked', 'error'], true)) {
$name = match ($payload['event']) {
'request' => MailerDeliveryEvent::RECEIVED,
| n;
use Symfony\Component\RemoteEvent\PayloadConverterInterface;
final class BrevoPayloadConverter implements PayloadConverterInterface
{
public function convert(array $payload): AbstractMailerEvent
{
if (\in_arra | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Brevo/RemoteEvent/BrevoPayloadConverter.php",
"language": "php",
"file_size": 2955,
"cut_index": 563,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Amazon\Transport;
use AsyncAws\Ses\Input\SendEmailRequest;
use AsyncAws\Ses\ValueObject\Content;
use Symfony\Component\Mailer\Envelope;
use Symfony\Component\Mailer\Exception\LogicException;
use Symfony\Component\Mailer\Exception\RuntimeExcept... | {
$configuration = $this->sesClient->getConfiguration();
if (!$configuration->isDefault('endpoint')) {
$endpoint = parse_url($configuration->get('endpoint'));
$host = $endpoint['host'].($endpoint['port'] ?? null ? | ime\Header\Headers;
use Symfony\Component\Mime\MessageConverter;
/**
* @author Jérémy Derussé <jeremy@derusse.com>
*/
class SesApiAsyncAwsTransport extends SesHttpAsyncAwsTransport
{
public function __toString(): string
| {
"filepath": "src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesApiAsyncAwsTransport.php",
"language": "php",
"file_size": 7327,
"cut_index": 716,
"middle_length": 229
} |
ge.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Amazon\Transport;
use Psr\EventDispatcher\EventDispatcherInterface;
use Psr\Log\LoggerInte... | default `eu-west-1`)
* @param string $host SMTP host; `'default'` resolves to `email-smtp.<region>.amazonaws.com`
* @param int $port SMTP port; `465`/`2465` use implicit TLS, any other port starts plain and
* | nsport;
use Symfony\Component\Mime\Message;
use Symfony\Component\Mime\RawMessage;
/**
* @author Kevin Verschaeve
*/
class SesSmtpTransport extends EsmtpTransport
{
/**
* @param string|null $region Amazon SES region ( | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesSmtpTransport.php",
"language": "php",
"file_size": 2601,
"cut_index": 563,
"middle_length": 229
} |
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesApiAsyncAwsTransport;
use Symfony\Component\Mailer\Exception\HttpTransportExcep... | rt);
}
public static function getTransportData()
{
return [
[
new SesApiAsyncAwsTransport(new SesClient(Configuration::create(['sharedConfigFile' => false, 'accessKeyId' => 'ACCESS_KEY', 'accessKeySecret' => | iAsyncAwsTransportTest extends TestCase
{
#[DataProvider('getTransportData')]
public function testToString(SesApiAsyncAwsTransport $transport, string $expected)
{
$this->assertSame($expected, (string) $transpo | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiAsyncAwsTransportTest.php",
"language": "php",
"file_size": 9676,
"cut_index": 921,
"middle_length": 229
} |
nt\HttpClient\MockHttpClient;
use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesApiAsyncAwsTransport;
use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesHttpAsyncAwsTransport;
use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesSmtpTransport;
use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesTransp... | return new SesTransportFactory(null, new MockHttpClient(), new NullLogger());
}
public static function supportsProvider(): iterable
{
yield [
new Dsn('ses+api', 'default'),
true,
];
yiel | y\Component\Mailer\Transport\TransportFactoryInterface;
class SesTransportFactoryTest extends AbstractTransportFactoryTestCase
{
use IncompleteDsnTestTrait;
public function getFactory(): TransportFactoryInterface
{
| {
"filepath": "src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesTransportFactoryTest.php",
"language": "php",
"file_size": 9814,
"cut_index": 921,
"middle_length": 229
} |
*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Scaleway\Transport;
use Psr\EventDispatcher\Eve... | string $token, ?EventDispatcherInterface $dispatcher = null, ?LoggerInterface $logger = null)
{
parent::__construct('smtp.tem.scw.cloud', 465, true, $dispatcher, $logger);
$this->setUsername($projetId);
$this->setPassword($tok | __construct(string $projetId, #[\SensitiveParameter] | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Scaleway/Transport/ScalewaySmtpTransport.php",
"language": "php",
"file_size": 841,
"cut_index": 520,
"middle_length": 52
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Scaleway\Tests\Transport;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpClient\Moc... | Case
{
#[DataProvider('getTransportData')]
public function testToString(ScalewayApiTransport $transport, string $expected)
{
$this->assertSame($expected, (string) $transport);
}
public static function getTransportData()
{
| pTransportException;
use Symfony\Component\Mime\Address;
use Symfony\Component\Mime\Email;
use Symfony\Component\Mime\Part\DataPart;
use Symfony\Contracts\HttpClient\ResponseInterface;
class ScalewayApiTransportTest extends Test | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Scaleway/Tests/Transport/ScalewayApiTransportTest.php",
"language": "php",
"file_size": 4739,
"cut_index": 614,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Scaleway\Tests\Transport;
use Psr\Log\NullLogger;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\Mailer\Bridge\Scalew... | terface;
class ScalewayTransportFactoryTest extends AbstractTransportFactoryTestCase
{
use IncompleteDsnTestTrait;
public function getFactory(): TransportFactoryInterface
{
return new ScalewayTransportFactory(null, new MockHttpClient( | ;
use Symfony\Component\Mailer\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Mailer\Test\IncompleteDsnTestTrait;
use Symfony\Component\Mailer\Transport\Dsn;
use Symfony\Component\Mailer\Transport\TransportFactoryIn | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Scaleway/Tests/Transport/ScalewayTransportFactoryTest.php",
"language": "php",
"file_size": 3166,
"cut_index": 614,
"middle_length": 229
} |
ge.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Postmark\Transport;
use Psr\EventDispatcher\EventDispatcherInterface;
use Psr\Log\LoggerIn... | lass PostmarkSmtpTransport extends EsmtpTransport
{
private ?string $messageStream = null;
public function __construct(#[\SensitiveParameter] string $id, ?EventDispatcherInterface $dispatcher = null, ?LoggerInterface $logger = null)
{
| er\TagHeader;
use Symfony\Component\Mailer\SentMessage;
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport;
use Symfony\Component\Mime\Message;
use Symfony\Component\Mime\RawMessage;
/**
* @author Kevin Verschaeve
*/
c | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Postmark/Transport/PostmarkSmtpTransport.php",
"language": "php",
"file_size": 2684,
"cut_index": 563,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Postmark\Tests\Transport;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Mailer\Bridge\Postmark\Transport\MessageStreamHeader;
use Sym... | ddTextHeader('foo', 'bar');
$transport = new PostmarkSmtpTransport('ACCESS_KEY');
$method = new \ReflectionMethod(PostmarkSmtpTransport::class, 'addPostmarkHeaders');
$method->invoke($transport, $email);
$this->assertCount | y\Component\Mailer\Header\TagHeader;
use Symfony\Component\Mime\Email;
class PostmarkSmtpTransportTest extends TestCase
{
public function testCustomHeader()
{
$email = new Email();
$email->getHeaders()->a | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Postmark/Tests/Transport/PostmarkSmtpTransportTest.php",
"language": "php",
"file_size": 3190,
"cut_index": 614,
"middle_length": 229
} |
ge.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Postmark\Tests\Webhook;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Componen... | tion createRequestParser(): RequestParserInterface
{
return new PostmarkRequestParser(new PostmarkPayloadConverter());
}
protected function createRequest(string $payload): Request
{
return Request::create('/', 'POST', [], [ | erface;
use Symfony\Component\Webhook\Exception\RejectWebhookException;
use Symfony\Component\Webhook\Test\AbstractRequestParserTestCase;
class PostmarkRequestParserTest extends AbstractRequestParserTestCase
{
protected func | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Postmark/Tests/Webhook/PostmarkRequestParserTest.php",
"language": "php",
"file_size": 2294,
"cut_index": 563,
"middle_length": 229
} |
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Postmark\Event;
use Symfony\Component\M... | essage(): string
{
return $this->message;
}
public function getMessageId(): ?string
{
if (!$this->headers->has('Message-ID')) {
return null;
}
return $this->headers->get('Message-ID')->getBodyAs | Headers $headers,
) {
}
public function getErrorCode(): int
{
return $this->errorCode;
}
public function getHeaders(): Headers
{
return $this->headers;
}
public function getM | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Postmark/Event/PostmarkDeliveryEvent.php",
"language": "php",
"file_size": 1015,
"cut_index": 512,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailgun\Transport;
use Psr\EventDispatcher\EventDispatcherInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\Mailer\Envelope;
use Symfony\Component\Mailer\Exception\HttpTransportException;
use Symfony\Component\Mailer\Header\Metadat... | ent\HttpClientInterface;
use Symfony\Contracts\HttpClient\ResponseInterface;
/**
* @author Kevin Verschaeve
*/
class MailgunApiTransport extends AbstractApiTransport
{
private const HOST = 'api.%region_dot%mailgun.net';
public function __constr |
use Symfony\Component\Mime\Part\Multipart\FormDataPart;
use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpCli | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailgun/Transport/MailgunApiTransport.php",
"language": "php",
"file_size": 6706,
"cut_index": 716,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailgun\Transport;
use Psr\EventDispatcher\EventDispatcherInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\Mailer\Exception\Http... | e Symfony\Contracts\HttpClient\ResponseInterface;
/**
* @author Kevin Verschaeve
*/
class MailgunHttpTransport extends AbstractHttpTransport
{
use MailgunHeadersTrait;
private const HOST = 'api.%region_dot%mailgun.net';
public function __c | \Part\Multipart\FormDataPart;
use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;
us | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailgun/Transport/MailgunHttpTransport.php",
"language": "php",
"file_size": 3414,
"cut_index": 614,
"middle_length": 229
} |
ge.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Brevo\Tests\Transport;
use Psr\Log\NullLogger;
use Symfony\Component\HttpClient\MockHttpCl... | r\Transport\TransportFactoryInterface;
class BrevoTransportFactoryTest extends AbstractTransportFactoryTestCase
{
use IncompleteDsnTestTrait;
public function getFactory(): TransportFactoryInterface
{
return new BrevoTransportFactory(n | ransport\BrevoTransportFactory;
use Symfony\Component\Mailer\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Mailer\Test\IncompleteDsnTestTrait;
use Symfony\Component\Mailer\Transport\Dsn;
use Symfony\Component\Maile | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Brevo/Tests/Transport/BrevoTransportFactoryTest.php",
"language": "php",
"file_size": 2921,
"cut_index": 563,
"middle_length": 229
} |
ge.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Brevo\Webhook;
use Symfony\Component\HttpFoundation\ChainRequestMatcher;
use Symfony\Compo... | Event\Mailer\AbstractMailerEvent;
use Symfony\Component\RemoteEvent\Exception\ParseException;
use Symfony\Component\Webhook\Client\AbstractRequestParser;
use Symfony\Component\Webhook\Exception\RejectWebhookException;
final class BrevoRequestParser extend | ent\HttpFoundation\RequestMatcher\MethodRequestMatcher;
use Symfony\Component\HttpFoundation\RequestMatcherInterface;
use Symfony\Component\Mailer\Bridge\Brevo\RemoteEvent\BrevoPayloadConverter;
use Symfony\Component\RemoteEvent\ | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Brevo/Webhook/BrevoRequestParser.php",
"language": "php",
"file_size": 2545,
"cut_index": 563,
"middle_length": 229
} |
ge.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Amazon\Transport;
use AsyncAws\Core\Configuration;
use AsyncAws\Ses\SesClient;
use Symfony... | create(Dsn $dsn): TransportInterface
{
$scheme = $dsn->getScheme();
$region = $dsn->getOption('region');
$port = $dsn->getPort() ?? 465;
if ('ses+smtp' === $scheme || 'ses+smtps' === $scheme) {
$transport = | r\Transport\TransportInterface;
/**
* @author Konstantin Myakshin <molodchick@gmail.com>
* @author Jérémy Derussé <jeremy@derusse.com>
*/
final class SesTransportFactory extends AbstractTransportFactory
{
public function | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesTransportFactory.php",
"language": "php",
"file_size": 2752,
"cut_index": 563,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Amazon\Tests\Transport;
use AsyncAws\Core\Configuration;
use AsyncAws\Core\Credentials\NullProvider;
use AsyncAws\Ses\SesClient;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpClient\Mo... | extends TestCase
{
#[DataProvider('getTransportData')]
public function testToString(SesHttpAsyncAwsTransport $transport, string $expected)
{
$this->assertSame($expected, (string) $transport);
}
public static function getTransp | TransportException;
use Symfony\Component\Mailer\Header\MetadataHeader;
use Symfony\Component\Mime\Address;
use Symfony\Component\Mime\Email;
use Symfony\Contracts\HttpClient\ResponseInterface;
class SesHttpAsyncAwsTransportTest | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpAsyncAwsTransportTest.php",
"language": "php",
"file_size": 7150,
"cut_index": 716,
"middle_length": 229
} |
part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Scaleway\Transport;
use Symfony\Component\Mailer\Exception\Unsup... | = $this->getPassword($dsn);
if ('scaleway+api' === $scheme || 'scaleway' === $scheme) {
$host = 'default' === $dsn->getHost() ? null : $dsn->getHost();
$port = $dsn->getPort();
$region = $dsn->getOption('region | final class ScalewayTransportFactory extends AbstractTransportFactory
{
public function create(Dsn $dsn): TransportInterface
{
$scheme = $dsn->getScheme();
$projectId = $this->getUser($dsn);
$token | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Scaleway/Transport/ScalewayTransportFactory.php",
"language": "php",
"file_size": 1662,
"cut_index": 537,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Postmark\Transport;
use Psr\EventDispatcher\EventDispatcherInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\Mailer\Bridge\Postmark\Event\PostmarkDeliveryEvent;
use Symfony\Component\Mailer\Envelope;
use Symfony\Component\Mailer\Ex... | ttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Contracts\HttpClient\ResponseInterface;
/**
* @author Kevin Verschaeve
*/
class PostmarkApiTransport extends AbstractApiTransport
{
pr | e Symfony\Component\Mailer\SentMessage;
use Symfony\Component\Mailer\Transport\AbstractApiTransport;
use Symfony\Component\Mime\Email;
use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
use Symfony\Contracts\H | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Postmark/Transport/PostmarkApiTransport.php",
"language": "php",
"file_size": 6666,
"cut_index": 716,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Postmark\Tests\Transport;
use Psr\Log\NullLogger;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\Mailer\Bridge\Postma... | terface;
class PostmarkTransportFactoryTest extends AbstractTransportFactoryTestCase
{
use IncompleteDsnTestTrait;
public function getFactory(): TransportFactoryInterface
{
return new PostmarkTransportFactory(null, new MockHttpClient( | ;
use Symfony\Component\Mailer\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Mailer\Test\IncompleteDsnTestTrait;
use Symfony\Component\Mailer\Transport\Dsn;
use Symfony\Component\Mailer\Transport\TransportFactoryIn | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Postmark/Tests/Transport/PostmarkTransportFactoryTest.php",
"language": "php",
"file_size": 3634,
"cut_index": 614,
"middle_length": 229
} |
ge.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Postmark\Webhook;
use Symfony\Component\HttpFoundation\ChainRequestMatcher;
use Symfony\Co... | oteEvent\Event\Mailer\AbstractMailerEvent;
use Symfony\Component\RemoteEvent\Exception\ParseException;
use Symfony\Component\Webhook\Client\AbstractRequestParser;
use Symfony\Component\Webhook\Exception\RejectWebhookException;
final class PostmarkRequestP | ponent\HttpFoundation\RequestMatcher\MethodRequestMatcher;
use Symfony\Component\HttpFoundation\RequestMatcherInterface;
use Symfony\Component\Mailer\Bridge\Postmark\RemoteEvent\PostmarkPayloadConverter;
use Symfony\Component\Rem | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Postmark/Webhook/PostmarkRequestParser.php",
"language": "php",
"file_size": 2343,
"cut_index": 563,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Brevo\Tests\Webhook;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Mailer\Bridge\Brevo\RemoteEvent\BrevoPayloadConverte... | rn new BrevoRequestParser(new BrevoPayloadConverter());
}
protected function getSecret(): string
{
return ':top-secret';
}
protected function createRequest(string $payload): Request
{
return Request::create('/', 'P | tion;
use Symfony\Component\Webhook\Test\AbstractRequestParserTestCase;
class BrevoRequestParserTest extends AbstractRequestParserTestCase
{
protected function createRequestParser(): RequestParserInterface
{
retu | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Brevo/Tests/Webhook/BrevoRequestParserTest.php",
"language": "php",
"file_size": 3792,
"cut_index": 614,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Amazon\Transport;
use AsyncAws\Core\Exception\Http\HttpException;
use AsyncAws\Ses\Input\SendEmailRequest;
use AsyncAws\Ses\SesClient;
use As... |
class SesHttpAsyncAwsTransport extends AbstractTransport
{
public function __construct(
protected SesClient $sesClient,
?EventDispatcherInterface $dispatcher = null,
?LoggerInterface $logger = null,
) {
parent::__co | mponent\Mailer\Header\MetadataHeader;
use Symfony\Component\Mailer\SentMessage;
use Symfony\Component\Mailer\Transport\AbstractTransport;
use Symfony\Component\Mime\Message;
/**
* @author Jérémy Derussé <jeremy@derusse.com>
*/ | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesHttpAsyncAwsTransport.php",
"language": "php",
"file_size": 4182,
"cut_index": 614,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Scaleway\Transport;
use Psr\EventDispatcher\EventDispatcherInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\Mailer\Envelope;
use Symfony\Component\Mailer\Exception\HttpTransportException;
use Symfony\Component\Mailer\SentMessage;
... | AbstractApiTransport
{
private const HOST = 'api.scaleway.com';
public function __construct(
private string $projectId,
#[\SensitiveParameter] private string $token,
private ?string $region = null,
?HttpClientInter | nterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Contracts\HttpClient\ResponseInterface;
final class ScalewayApiTransport extends | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Scaleway/Transport/ScalewayApiTransport.php",
"language": "php",
"file_size": 5603,
"cut_index": 716,
"middle_length": 229
} |
ventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\JsonMockResponse;
use Symfony\Component\Mailer\Bridge\Postmark\Event\PostmarkDeliveryEvent;
use Symfony\Component\Mailer\Bridge\Postmark\Transport\MessageStreamHeader;
use Symfony\Componen... | esponseInterface;
class PostmarkApiTransportTest extends TestCase
{
#[DataProvider('getTransportData')]
public function testToString(PostmarkApiTransport $transport, string $expected)
{
$this->assertSame($expected, (string) $transport) | ption\TransportException;
use Symfony\Component\Mailer\Header\MetadataHeader;
use Symfony\Component\Mailer\Header\TagHeader;
use Symfony\Component\Mime\Address;
use Symfony\Component\Mime\Email;
use Symfony\Contracts\HttpClient\R | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Postmark/Tests/Transport/PostmarkApiTransportTest.php",
"language": "php",
"file_size": 10022,
"cut_index": 921,
"middle_length": 229
} |
ge.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Postmark\RemoteEvent;
use Symfony\Component\RemoteEvent\Event\Mailer\AbstractMailerEvent;
... | n_array($payload['RecordType'], ['Delivery', 'Bounce'], true)) {
$name = match ($payload['RecordType']) {
'Delivery' => MailerDeliveryEvent::DELIVERED,
'Bounce' => MailerDeliveryEvent::BOUNCE,
};
| tion;
use Symfony\Component\RemoteEvent\PayloadConverterInterface;
final class PostmarkPayloadConverter implements PayloadConverterInterface
{
public function convert(array $payload): AbstractMailerEvent
{
if (\i | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Postmark/RemoteEvent/PostmarkPayloadConverter.php",
"language": "php",
"file_size": 3029,
"cut_index": 563,
"middle_length": 229
} |
part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Postmark\Transport;
use Symfony\Component\Mailer\Exception\Unsup... | $scheme = $dsn->getScheme();
$user = $this->getUser($dsn);
if ('postmark+api' === $scheme) {
$host = 'default' === $dsn->getHost() ? null : $dsn->getHost();
$port = $dsn->getPort();
$transport = (new | /**
* @author Konstantin Myakshin <molodchick@gmail.com>
*/
final class PostmarkTransportFactory extends AbstractTransportFactory
{
public function create(Dsn $dsn): TransportInterface
{
$transport = null;
| {
"filepath": "src/Symfony/Component/Mailer/Bridge/Postmark/Transport/PostmarkTransportFactory.php",
"language": "php",
"file_size": 1859,
"cut_index": 537,
"middle_length": 229
} |
ge.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Amazon\Tests\Transport;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Mailer\Bridg... | Value2'));
$transport = new SesSmtpTransport('user', 'pass');
$method = new \ReflectionMethod(SesSmtpTransport::class, 'addSesHeaders');
$method->invoke($transport, $email);
$this->assertCount(1, $email->getHeaders()->toAr | stTagAndMetadataAndMessageStreamHeaders()
{
$email = new Email();
$email->getHeaders()->add(new MetadataHeader('tagName1', 'tag Value1'));
$email->getHeaders()->add(new MetadataHeader('tagName2', 'tag | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesSmtpTransportTest.php",
"language": "php",
"file_size": 2062,
"cut_index": 563,
"middle_length": 229
} |
part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailgun\Transport;
use Symfony\Component\Mailer\Envelope;
use Sy... | age) {
$message = clone $message;
$this->addMailgunHeaders($message);
}
return parent::send($message, $envelope);
}
private function addMailgunHeaders(Message $message): void
{
$headers = $messa | \Mime\RawMessage;
/**
* @author Kevin Bond <kevinbond@gmail.com>
*/
trait MailgunHeadersTrait
{
public function send(RawMessage $message, ?Envelope $envelope = null): ?SentMessage
{
if ($message instanceof Mess | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailgun/Transport/MailgunHeadersTrait.php",
"language": "php",
"file_size": 1609,
"cut_index": 537,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailchimp\Tests\Transport;
use Psr\Log\NullLogger;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\Mailer\Bridge\Mailc... | ent\Mailer\Transport\Dsn;
use Symfony\Component\Mailer\Transport\TransportFactoryInterface;
class MandrillTransportFactoryTest extends AbstractTransportFactoryTestCase
{
use IncompleteDsnTestTrait;
public function getFactory(): TransportFactoryIn | t;
use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillTransportFactory;
use Symfony\Component\Mailer\Test\AbstractTransportFactoryTestCase;
use Symfony\Component\Mailer\Test\IncompleteDsnTestTrait;
use Symfony\Compon | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillTransportFactoryTest.php",
"language": "php",
"file_size": 3833,
"cut_index": 614,
"middle_length": 229
} |
text;
use Symfony\Component\VarDumper\Cloner\Stub;
use Symfony\Component\VarDumper\Exception\ThrowingCasterException;
/**
* Casts common Exception classes to array representation.
*
* @author Nicolas Grekas <p@tchwork.com>
*
* @final
*
* @internal
*/
class ExceptionCaster
{
public static int $srcContext = ... | RNING => 'E_CORE_WARNING',
\E_COMPILE_ERROR => 'E_COMPILE_ERROR',
\E_COMPILE_WARNING => 'E_COMPILE_WARNING',
\E_USER_ERROR => 'E_USER_ERROR',
\E_USER_WARNING => 'E_USER_WARNING',
\E_USER_NOTICE => 'E_USER_NOTICE',
| VERABLE_ERROR => 'E_RECOVERABLE_ERROR',
\E_ERROR => 'E_ERROR',
\E_WARNING => 'E_WARNING',
\E_PARSE => 'E_PARSE',
\E_NOTICE => 'E_NOTICE',
\E_CORE_ERROR => 'E_CORE_ERROR',
\E_CORE_WA | {
"filepath": "src/Symfony/Component/VarDumper/Caster/ExceptionCaster.php",
"language": "php",
"file_size": 16464,
"cut_index": 921,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\VarDumper\Caster;
use FFI\CData;
use FFI\CType;
use Symfony\Component\VarDumper\Cloner\Stub;
/**
* Casts FFI extension classes to array representation.
*
* @author Nesmeyanov Kirill <nesk@xakep.ru>
*/
final class FFICaster
{
/**
* In case of "... | pe $data, array $args, Stub $stub): array
{
if ($data instanceof CType) {
$type = $data;
$data = null;
} else {
$type = \FFI::typeof($data);
}
$stub->class = \sprintf('%s<%s> size %d | *
* This restriction serves to ensure that processing does not take
* up the entire allowable PHP memory limit.
*/
private const MAX_STRING_LENGTH = 255;
public static function castCTypeOrCData(CData|CTy | {
"filepath": "src/Symfony/Component/VarDumper/Caster/FFICaster.php",
"language": "php",
"file_size": 5669,
"cut_index": 716,
"middle_length": 229
} |
hp
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\VarDumper\Caster;
use Symfony\Component\VarDumper\Cloner... | ()) {
$status = 'running';
} elseif ($fiber->isSuspended()) {
$status = 'suspended';
} elseif ($fiber->isStarted()) {
$status = 'started';
} else {
$status = 'not started';
}
| $fiber, array $a, Stub $stub, bool $isNested, int $filter = 0): array
{
$prefix = Caster::PREFIX_VIRTUAL;
if ($fiber->isTerminated()) {
$status = 'terminated';
} elseif ($fiber->isRunning | {
"filepath": "src/Symfony/Component/VarDumper/Caster/FiberCaster.php",
"language": "php",
"file_size": 1069,
"cut_index": 515,
"middle_length": 229
} |
n Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\VarDumper\Caster;
use Imagine\Image\ImageInterface;
use Symfony\Component\VarDumper\Cloner\Stub;
/**
* @author Grégoire P... | a) > 1 * 1000 * 1000) {
$a += [
Caster::PREFIX_VIRTUAL.'image' => new ConstStub($c->getSize()),
];
} else {
$a += [
Caster::PREFIX_VIRTUAL.'image' => new ImgStub($imgData, 'image/p | mgData = $c->get('png');
if (\strlen($imgDat | {
"filepath": "src/Symfony/Component/VarDumper/Caster/ImagineCaster.php",
"language": "php",
"file_size": 965,
"cut_index": 582,
"middle_length": 52
} |
buted with this source code.
*/
namespace Symfony\Component\VarDumper\Caster;
use Symfony\Component\VarDumper\Cloner\Stub;
/**
* @author Nicolas Grekas <p@tchwork.com>
* @author Jan Schädlich <jan.schaedlich@sensiolabs.de>
*
* @final
*
* @internal
*/
class IntlCaster
{
public static function castMessageF... | {
$a += [
Caster::PREFIX_VIRTUAL.'locale' => $c->getLocale(),
Caster::PREFIX_VIRTUAL.'pattern' => $c->getPattern(),
];
if ($filter & Caster::EXCLUDE_VERBOSE) {
$stub->cut += 3;
retur | TUAL.'pattern' => $c->getPattern(),
];
return self::castError($c, $a);
}
public static function castNumberFormatter(\NumberFormatter $c, array $a, Stub $stub, bool $isNested, int $filter = 0): array
| {
"filepath": "src/Symfony/Component/VarDumper/Caster/IntlCaster.php",
"language": "php",
"file_size": 8983,
"cut_index": 716,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\VarDumper\Caster;
/**
* Represents a file or a URL.
*
* @author Nicolas Grekas <p@tchwork.com>
*/
class LinkStub extends ConstStub
{
public bool $i... | bel, 7);
}
$href = substr($href, 7);
} elseif (str_contains($href, '://')) {
$this->attr['href'] = $href;
return;
}
if (!is_file($href)) {
return;
}
if ($l | {
$this->value = $label;
if (!\is_string($href ??= $label)) {
return;
}
if (str_starts_with($href, 'file://')) {
if ($href === $label) {
$label = substr($la | {
"filepath": "src/Symfony/Component/VarDumper/Caster/LinkStub.php",
"language": "php",
"file_size": 3371,
"cut_index": 614,
"middle_length": 229
} |
ge.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\VarDumper\Caster;
use Symfony\Component\VarDumper\Cloner\Stub;
/**
* @author Jan Schädlich <jan.schaed... | self::getNonDefaultOptions($c)
),
];
return $a;
}
private static function getNonDefaultOptions(\Memcached $c): array
{
self::$defaultOptions ??= self::discoverDefaultOptions();
self::$op | stMemcached(\Memcached $c, array $a, Stub $stub, bool $isNested): array
{
$a += [
Caster::PREFIX_VIRTUAL.'servers' => $c->getServerList(),
Caster::PREFIX_VIRTUAL.'options' => new EnumStub(
| {
"filepath": "src/Symfony/Component/VarDumper/Caster/MemcachedCaster.php",
"language": "php",
"file_size": 2309,
"cut_index": 563,
"middle_length": 229
} |
ge.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\VarDumper\Caster;
use Symfony\Component\VarDumper\Cloner\Stub;
/**
* @author Nicolas Grekas <p@tchwork... | ice(explode("\n", $pin), 1, -2);
$pin = base64_decode(implode('', $pin));
$pin = base64_encode(hash('sha256', $pin, true));
$a += [
Caster::PREFIX_VIRTUAL.'subject' => new EnumStub(array_intersect_key($info['subject'], | tub, bool $isNested): array
{
$stub->cut = -1;
$info = openssl_x509_parse($h, false);
$pin = openssl_pkey_get_public($h);
$pin = openssl_pkey_get_details($pin)['key'];
$pin = \array_sl | {
"filepath": "src/Symfony/Component/VarDumper/Caster/OpenSSLCaster.php",
"language": "php",
"file_size": 2553,
"cut_index": 563,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\VarDumper\Caster;
use Symfony\Component\VarDumper\Cloner\Stub;
/**
* Casts PDO related classes to array representation.
*
* @author Nicolas Grekas <p@t... | ION',
],
'TIMEOUT',
'PREFETCH',
'AUTOCOMMIT',
'PERSISTENT',
'DRIVER_NAME',
'SERVER_INFO',
'ORACLE_NULLS' => [
\PDO::NULL_NATURAL => 'NATURAL',
\PDO::NULL_EMPTY_STRING = | => 'NATURAL',
\PDO::CASE_UPPER => 'UPPER',
],
'ERRMODE' => [
\PDO::ERRMODE_SILENT => 'SILENT',
\PDO::ERRMODE_WARNING => 'WARNING',
\PDO::ERRMODE_EXCEPTION => 'EXCEPT | {
"filepath": "src/Symfony/Component/VarDumper/Caster/PdoCaster.php",
"language": "php",
"file_size": 3585,
"cut_index": 614,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\VarDumper\Caster;
use Symfony\Component\VarDumper\Cloner\Stub;
/**
* Casts pgsql resources to array representation.
*
* @author Nicolas Grekas <p@tchwork.com>
*
* @final
*
* @internal
*/
class PgSqlCaster
{
private const PARAM_CODES = [
... | RANSACTION_ACTIVE',
\PGSQL_TRANSACTION_INTRANS => 'PGSQL_TRANSACTION_INTRANS',
\PGSQL_TRANSACTION_INERROR => 'PGSQL_TRANSACTION_INERROR',
\PGSQL_TRANSACTION_UNKNOWN => 'PGSQL_TRANSACTION_UNKNOWN',
];
private const RESULT_ST | imes',
'application_name',
'standard_conforming_strings',
];
private const TRANSACTION_STATUS = [
\PGSQL_TRANSACTION_IDLE => 'PGSQL_TRANSACTION_IDLE',
\PGSQL_TRANSACTION_ACTIVE => 'PGSQL_T | {
"filepath": "src/Symfony/Component/VarDumper/Caster/PgSqlCaster.php",
"language": "php",
"file_size": 5535,
"cut_index": 716,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\VarDumper\Caster;
use RdKafka\Conf;
use RdKafka\Exception as RdKafkaException;
use RdKafka\KafkaConsumer;
use RdKafka\Message;
use RdKafka\Metadata\Broker ... | ss RdKafkaCaster
{
public static function castKafkaConsumer(KafkaConsumer $c, array $a, Stub $stub, bool $isNested): array
{
$prefix = Caster::PREFIX_VIRTUAL;
try {
$assignment = $c->getAssignment();
} catch (Rd | se RdKafka\TopicConf;
use RdKafka\TopicPartition;
use Symfony\Component\VarDumper\Cloner\Stub;
/**
* Casts RdKafka related classes to array representation.
*
* @author Romain Neutron <imprec@gmail.com>
*
* @internal
*/
cla | {
"filepath": "src/Symfony/Component/VarDumper/Caster/RdKafkaCaster.php",
"language": "php",
"file_size": 4745,
"cut_index": 614,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\VarDumper\Caster;
use Relay\Relay;
use Symfony\Component\VarDumper\Cloner\Stub;
/**
* Casts Redis class from ext-redis to array representation.
*
* @author Nicolas Grekas <p@tchwork.com>
*
* @final
*
* @internal
*/
class RedisCaster
{
private c... | SION_NONE
1 => 'LZF', // Redis::COMPRESSION_LZF
];
private const FAILOVER_OPTIONS = [
\RedisCluster::FAILOVER_NONE => 'NONE',
\RedisCluster::FAILOVER_ERROR => 'ERROR',
\RedisCluster::FAILOVER_DISTRIBUTE => 'DISTRIB | vate const MODES = [
0 => 'ATOMIC', // Redis::ATOMIC
1 => 'MULTI', // Redis::MULTI
2 => 'PIPELINE', // Redis::PIPELINE
];
private const COMPRESSION_MODES = [
0 => 'NONE', // Redis::COMPRES | {
"filepath": "src/Symfony/Component/VarDumper/Caster/RedisCaster.php",
"language": "php",
"file_size": 5491,
"cut_index": 716,
"middle_length": 229
} |
Nicolas Grekas <p@tchwork.com>
*
* @final
*
* @internal
*/
class ReflectionCaster
{
public const UNSET_CLOSURE_FILE_INFO = ['Closure' => __CLASS__.'::unsetClosureFileInfo'];
private const EXTRA_MAP = [
'docComment' => 'getDocComment',
'extension' => 'getExtensionName',
'isDisabled'... | ction($c);
$a = static::castFunctionAbstract($c, $a, $stub, $isNested, $filter);
if (!$c->isAnonymous()) {
$stub->class = isset($a[$prefix.'class']) ? $a[$prefix.'class']->value.'::'.$c->name : $c->name;
unset($a[$ | sVariadic' => 'isVariadic',
];
public static function castClosure(\Closure $c, array $a, Stub $stub, bool $isNested, int $filter = 0): array
{
$prefix = Caster::PREFIX_VIRTUAL;
$c = new \ReflectionFun | {
"filepath": "src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php",
"language": "php",
"file_size": 15045,
"cut_index": 921,
"middle_length": 229
} |
This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\VarDumper\Caster;
use Symfony\Component\VarDumper\Cloner\Stub;
/... | dba_list();
$a['file'] = $list[(int) $dba];
return $a;
}
public static function castProcess($process, array $a, Stub $stub, bool $isNested): array
{
return proc_get_status($process);
}
public static function c | ba(\Dba\Connection $dba, array $a, Stub $stub, bool $isNested): array
{
if (\PHP_VERSION_ID < 80402) {
// @see https://github.com/php/php-src/issues/16990
return $a;
}
$list = | {
"filepath": "src/Symfony/Component/VarDumper/Caster/ResourceCaster.php",
"language": "php",
"file_size": 1473,
"cut_index": 524,
"middle_length": 229
} |
part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\VarDumper\Caster;
use Symfony\Component\VarDumper\Cloner\Stub;
/**
* @author... | _with($uri, 'unix://')) {
$uri .= $addr;
} else {
$uri .= \sprintf(str_contains($addr, ':') ? '[%s]:%s' : '%s:%s', $addr, $port);
}
$a[Caster::PREFIX_VIRTUAL.'uri'] = $uri;
if (@socket_atmark($socke | y $a, Stub $stub, bool $isNested): array
{
socket_getsockname($socket, $addr, $port);
$info = stream_get_meta_data(socket_export_stream($socket));
$uri = ($info['uri'] ?? '//');
if (str_starts | {
"filepath": "src/Symfony/Component/VarDumper/Caster/SocketCaster.php",
"language": "php",
"file_size": 1751,
"cut_index": 537,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\VarDumper\Caster;
use Symfony\Component\VarDumper\Cloner\Stub;
/**
* Casts SPL related classes to array representation.
*
* @author Nicolas Grekas <p@tchwork.com>
*
* @final
*
* @internal
*/
class SplCaster
{
private const SPL_FILE_OBJECT_FLAGS... | unction castArrayIterator(\ArrayIterator $c, array $a, Stub $stub, bool $isNested): array
{
return self::castSplArray($c, $a, $stub, $isNested);
}
public static function castHeap(\Iterator $c, array $a, Stub $stub, bool $isNested): arr | EAD_CSV => 'READ_CSV',
];
public static function castArrayObject(\ArrayObject $c, array $a, Stub $stub, bool $isNested): array
{
return self::castSplArray($c, $a, $stub, $isNested);
}
public static f | {
"filepath": "src/Symfony/Component/VarDumper/Caster/SplCaster.php",
"language": "php",
"file_size": 8036,
"cut_index": 716,
"middle_length": 229
} |
ge.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\VarDumper\Caster;
use Symfony\Component\VarDumper\Cloner\Stub;
/**
* Casts a caster's Stub.
*
* @aut... | c->attr;
if (Stub::TYPE_REF === $c->type && !$c->class && \is_string($c->value) && !preg_match('//u', $c->value)) {
$stub->type = Stub::TYPE_STRING;
$stub->class = Stub::STRING_BINARY;
}
| f ($isNested) {
$stub->type = $c->type;
$stub->class = $c->class;
$stub->value = $c->value;
$stub->handle = $c->handle;
$stub->cut = $c->cut;
$stub->attr = $ | {
"filepath": "src/Symfony/Component/VarDumper/Caster/StubCaster.php",
"language": "php",
"file_size": 2725,
"cut_index": 563,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\VarDumper\Caster;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Uid\TimeBasedUidInterface;
use Symfony\Component\Uid\Ulid;
use Symfon... | => 'getRequestFormat',
];
public static function castRequest(Request $request, array $a, Stub $stub, bool $isNested): array
{
$clone = null;
foreach (self::REQUEST_GETTERS as $prop => $getter) {
$key = Caster::PRE | ate const REQUEST_GETTERS = [
'pathInfo' => 'getPathInfo',
'requestUri' => 'getRequestUri',
'baseUrl' => 'getBaseUrl',
'basePath' => 'getBasePath',
'method' => 'getMethod',
'format' | {
"filepath": "src/Symfony/Component/VarDumper/Caster/SymfonyCaster.php",
"language": "php",
"file_size": 3742,
"cut_index": 614,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\VarDumper\Caster;
use Symfony\Component\VarDumper\Cloner\Stub;
/**
* Casts XmlReader class to array representation.
*
* @author Baptiste Clavié <clavie... | Processing Instruction)',
\XMLReader::COMMENT => 'COMMENT',
\XMLReader::DOC => 'DOC',
\XMLReader::DOC_TYPE => 'DOC_TYPE',
\XMLReader::DOC_FRAGMENT => 'DOC_FRAGMENT',
\XMLReader::NOTATION => 'NOTATION',
\XMLRe | MLReader::ATTRIBUTE => 'ATTRIBUTE',
\XMLReader::TEXT => 'TEXT',
\XMLReader::CDATA => 'CDATA',
\XMLReader::ENTITY_REF => 'ENTITY_REF',
\XMLReader::ENTITY => 'ENTITY',
\XMLReader::PI => 'PI ( | {
"filepath": "src/Symfony/Component/VarDumper/Caster/XmlReaderCaster.php",
"language": "php",
"file_size": 3401,
"cut_index": 614,
"middle_length": 229
} |
ge.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\VarDumper\Caster;
use Symfony\Component\VarDumper\Cloner\Stub;
/**
* Casts XML resources to array repr... | \XML_ERROR_UNCLOSED_TOKEN => 'XML_ERROR_UNCLOSED_TOKEN',
\XML_ERROR_PARTIAL_CHAR => 'XML_ERROR_PARTIAL_CHAR',
\XML_ERROR_TAG_MISMATCH => 'XML_ERROR_TAG_MISMATCH',
\XML_ERROR_DUPLICATE_ATTRIBUTE => 'XML_ERROR_DUPLICATE_ATTRIBU | ,
\XML_ERROR_NO_MEMORY => 'XML_ERROR_NO_MEMORY',
\XML_ERROR_SYNTAX => 'XML_ERROR_SYNTAX',
\XML_ERROR_NO_ELEMENTS => 'XML_ERROR_NO_ELEMENTS',
\XML_ERROR_INVALID_TOKEN => 'XML_ERROR_INVALID_TOKEN',
| {
"filepath": "src/Symfony/Component/VarDumper/Caster/XmlResourceCaster.php",
"language": "php",
"file_size": 2568,
"cut_index": 563,
"middle_length": 229
} |
part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Symfony\Component\VarDumper\Caster\ScalarStub;
use Symfony\Component\VarDumper\VarDumper;
if (!functio... | } else {
foreach ($vars as $k => $v) {
VarDumper::dump($v, is_int($k) ? 1 + $k : $k);
}
}
if (1 < count($vars)) {
return $vars;
}
return $vars[$k];
}
}
if (!fu | if (!$vars) {
VarDumper::dump(new ScalarStub('🐛'));
return null;
}
if (array_key_exists(0, $vars) && 1 === count($vars)) {
VarDumper::dump($vars[0]);
$k = 0;
| {
"filepath": "src/Symfony/Component/VarDumper/Resources/functions/dump.php",
"language": "php",
"file_size": 1634,
"cut_index": 537,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\VarDumper\Command;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Completi... | \VarDumper\Command\Descriptor\CliDescriptor;
use Symfony\Component\VarDumper\Command\Descriptor\DumpDescriptorInterface;
use Symfony\Component\VarDumper\Command\Descriptor\HtmlDescriptor;
use Symfony\Component\VarDumper\Dumper\CliDumper;
use Symfony\Compon | nterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\VarDumper\Cloner\Data;
use Symfony\Component | {
"filepath": "src/Symfony/Component/VarDumper/Command/ServerDumpCommand.php",
"language": "php",
"file_size": 3939,
"cut_index": 614,
"middle_length": 229
} |
ge.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\VarDumper\Command\Descriptor;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Cons... | function __construct(
private CliDumper $dumper,
) {
}
public function describe(OutputInterface $output, Data $data, array $context, int $clientId): void
{
$io = $output instanceof SymfonyStyle ? $output : new SymfonyStyle | llected data clones for cli output.
*
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
*
* @final
*/
class CliDescriptor implements DumpDescriptorInterface
{
private mixed $lastIdentifier = null;
public | {
"filepath": "src/Symfony/Component/VarDumper/Command/Descriptor/CliDescriptor.php",
"language": "php",
"file_size": 2618,
"cut_index": 563,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\VarDumper\Command\Descriptor;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\VarDumper\Cloner\Data;
use Symfony\Component\VarD... | ntext, int $clientId): void
{
if (!$this->initialized) {
$styles = file_get_contents(__DIR__.'/../../Resources/css/htmlDescriptor.css');
$scripts = file_get_contents(__DIR__.'/../../Resources/js/htmlDescriptor.js');
| nts DumpDescriptorInterface
{
private bool $initialized = false;
public function __construct(
private HtmlDumper $dumper,
) {
}
public function describe(OutputInterface $output, Data $data, array $co | {
"filepath": "src/Symfony/Component/VarDumper/Command/Descriptor/HtmlDescriptor.php",
"language": "php",
"file_size": 3962,
"cut_index": 614,
"middle_length": 229
} |
abstract class AbstractTwigTemplate extends Twig\Template
{
private function createError()
{
return new \RuntimeException('Manually triggered error.');
}
public function provideError()
{
return $this->createError();
}
}
/* foo.twig */
class __TwigTemplate_VarDumperFixture_u75a... | ow new \Exception('Foobar');
}
public function getTemplateName(): string
{
return 'foo.twig';
}
public function getDebugInfo(): array
{
return [33 => 1, 34 => 2];
}
public function getSourceContext(): Twig | truct($env);
}
$this->parent = false;
$this->blocks = [];
$this->path = $path;
}
protected function doDisplay(array $context, array $blocks = []): array
{
// line 2
thr | {
"filepath": "src/Symfony/Component/VarDumper/Tests/Fixtures/Twig.php",
"language": "php",
"file_size": 1130,
"cut_index": 518,
"middle_length": 229
} |
hp
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\VarDumper\Tests\Fixture;
if (!class_exists(\Symfony\Comp... | g,
'obj' => $foo,
'closure' => function ($a, ?\PDO &$b = null) {},
'line' => __LINE__ - 1,
'nobj' => [(object) []],
];
$r = [];
$r[] = &$r;
$var['recurs'] = &$r;
$var[] = &$var[0];
$var['sobj'] = $var['obj'];
$var['snobj'] = &$var['nobj'] | en(__FILE__, 'r');
$var = [
'number' => 1, null,
'const' => 1.1, true, false, \NAN, \INF, -\INF, \PHP_INT_MAX,
'str' => "déjà\n", "\xE9\x01test\t\ning", "bo\u{feff}m" => "te\u{feff}st",
'[]' => [],
'res' => $ | {
"filepath": "src/Symfony/Component/VarDumper/Tests/Fixtures/dumb-var.php",
"language": "php",
"file_size": 1109,
"cut_index": 515,
"middle_length": 229
} |
ent\VarDumper\Cloner\VarCloner;
use Symfony\Component\VarDumper\Dumper\CliDumper;
use Symfony\Component\VarDumper\Server\DumpServer;
use Symfony\Component\VarDumper\VarDumper;
$componentRoot = $_SERVER['COMPONENT_ROOT'];
if (!is_file($file = $componentRoot.'/vendor/autoload.php')) {
$file = $componentRoot.'/../..... | ndler(function ($var) use ($cloner, $dumper) {
$data = $cloner->cloneVar($var)->withRefHandles(false);
$dumper->dump($data);
});
$server = new DumpServer(getenv('VAR_DUMPER_SERVER'));
$server->start();
echo "READY\n";
$server->listen(function ( | ENGTH);
$dumper->setColors(false);
VarDumper::setHa | {
"filepath": "src/Symfony/Component/VarDumper/Tests/Fixtures/dump_server.php",
"language": "php",
"file_size": 996,
"cut_index": 582,
"middle_length": 52
} |
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\VarDumper\Tests\Server;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Process\PhpProcess;
use Sy... | arkTestSkipped('Skip transient test on Windows');
}
$cloner = new VarCloner();
$data = $cloner->cloneVar('foo');
$connection = new Connection(self::VAR_DUMPER_SERVER, [
'foo_provider' => new class implements Con | per\Server\Connection;
class ConnectionTest extends TestCase
{
private const VAR_DUMPER_SERVER = 'tcp://127.0.0.1:9913';
public function testDump()
{
if ('\\' === \DIRECTORY_SEPARATOR) {
$this->m | {
"filepath": "src/Symfony/Component/VarDumper/Tests/Server/ConnectionTest.php",
"language": "php",
"file_size": 2702,
"cut_index": 563,
"middle_length": 229
} |
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\VarDumper\Tests\Caster;
use PHPUnit\Framework\Attributes\Require... | er()
{
$xDump = <<<EODUMP
AddressInfo {
ai_flags: 0
ai_family: AF_INET%A
}
EODUMP;
$this->assertDumpMatchesFormat($xDump, socket_addrinfo_lookup('localhost')[0]);
}
}
| se VarDumperTestTrait;
public function testCast | {
"filepath": "src/Symfony/Component/VarDumper/Tests/Caster/AddressInfoCasterTest.php",
"language": "php",
"file_size": 831,
"cut_index": 523,
"middle_length": 52
} |
buted with this source code.
*/
namespace Symfony\Component\VarDumper\Tests\Caster;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Component\VarDumper\Caster\Caster;
use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
/**
* @author Nicolas Grekas <p@tchwork.com>
*/... | Diff, $listedProperties = null)
{
if (null === $listedProperties) {
$filteredArray = Caster::filter(self::$referenceArray, $filter);
} else {
$filteredArray = Caster::filter(self::$referenceArray, $filter, $liste | "\0~\0virtual" => 'virt',
"\0+\0dynamic" => 'dyn',
"\0*\0protected" => 'prot',
"\0Foo\0private" => 'priv',
];
#[DataProvider('provideFilter')]
public function testFilter($filter, $expected | {
"filepath": "src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php",
"language": "php",
"file_size": 5796,
"cut_index": 716,
"middle_length": 229
} |
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\VarDumper\Tests\Caster;
use PHPUnit\Framework\Attribu... | rmat(
<<<'EODUMP'
CurlHandle {
url: "http://example.com/"
content_type: "text/html%S"
http_code: %d
%A
}
EODUMP,
$ | use VarDumperTestTrait;
public function testCastCurl()
{
$ch = curl_init('http://example.com');
curl_setopt($ch, \CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
$this->assertDumpMatchesFo | {
"filepath": "src/Symfony/Component/VarDumper/Tests/Caster/CurlCasterTest.php",
"language": "php",
"file_size": 1019,
"cut_index": 512,
"middle_length": 229
} |
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailchimp\RemoteEvent;
use Symfony\Component\RemoteEvent\Event\Mailer\AbstractMailerEvent;
use Symfony\Component\RemoteEvent\Event\Mailer\Mai... | soft_bounce', 'hard_bounce', 'delivered', 'reject'], true)) {
$name = match ($payload['event']) {
'send' => MailerDeliveryEvent::RECEIVED,
'deferral', => MailerDeliveryEvent::DEFERRED,
'soft_bounc | verterInterface;
final class MailchimpPayloadConverter implements PayloadConverterInterface
{
public function convert(array $payload): AbstractMailerEvent
{
if (\in_array($payload['event'], ['send', 'deferral', ' | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailchimp/RemoteEvent/MailchimpPayloadConverter.php",
"language": "php",
"file_size": 3186,
"cut_index": 614,
"middle_length": 229
} |
buted with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailjet\Transport;
use Psr\EventDispatcher\EventDispatcherInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\Mailer\Envelope;
use Symfony\Component\Mailer\Exception\HttpTransportException;
use Symfony\Component\Mailer\Exception\Tran... | sponseInterface;
class MailjetApiTransport extends AbstractApiTransport
{
private const HOST = 'api.mailjet.com';
private const API_VERSION = '3.1';
private const FORBIDDEN_HEADERS = [
'date', 'x-csa-complaints', 'message-id', 'x-mj-st | Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Contracts\HttpClient\Re | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailjet/Transport/MailjetApiTransport.php",
"language": "php",
"file_size": 8896,
"cut_index": 716,
"middle_length": 229
} |
*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailjet\Transport;
use Psr\EventDispatcher\Even... | $password, ?EventDispatcherInterface $dispatcher = null, ?LoggerInterface $logger = null)
{
parent::__construct('in-v3.mailjet.com', 587, false, $dispatcher, $logger);
$this->setUsername($username);
$this->setPassword($password | uct(string $username, #[\SensitiveParameter] string | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailjet/Transport/MailjetSmtpTransport.php",
"language": "php",
"file_size": 839,
"cut_index": 520,
"middle_length": 52
} |
;
class MailjetApiTransportTest extends TestCase
{
protected const USER = 'u$er';
protected const PASSWORD = 'pa$s';
#[DataProvider('getTransportData')]
public function testToString(MailjetApiTransport $transport, string $expected)
{
$this->assertSame($expected, (string) $transport);
}... | MailjetApiTransport(self::USER, self::PASSWORD, sandbox: true))->setHost('example.com'),
'mailjet+api://example.com?sandbox=true',
],
];
}
public function testPayloadFormat()
{
$email = (new Email() | ljet.com',
],
[
(new MailjetApiTransport(self::USER, self::PASSWORD))->setHost('example.com'),
'mailjet+api://example.com',
],
[
(new | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailjet/Tests/Transport/MailjetApiTransportTest.php",
"language": "php",
"file_size": 19649,
"cut_index": 1331,
"middle_length": 229
} |
ge.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Bridge\Mailjet\Tests\Webhook;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component... | reateRequestParser(): RequestParserInterface
{
return new MailjetRequestParser(new MailjetPayloadConverter());
}
protected function getSecret(): string
{
return ':top-secret';
}
protected function createRequest(str | e;
use Symfony\Component\Webhook\Exception\RejectWebhookException;
use Symfony\Component\Webhook\Test\AbstractRequestParserTestCase;
class MailjetRequestParserTest extends AbstractRequestParserTestCase
{
protected function c | {
"filepath": "src/Symfony/Component/Mailer/Bridge/Mailjet/Tests/Webhook/MailjetRequestParserTest.php",
"language": "php",
"file_size": 2396,
"cut_index": 563,
"middle_length": 229
} |
ge.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Test;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\... | ctoryInterface;
/**
* @psalm-return iterable<array{0: Dsn, 1: bool}>
*/
abstract public static function supportsProvider(): iterable;
/**
* @psalm-return iterable<array{0: Dsn, 1: TransportInterface}>
*/
abstract publi | r\Transport\TransportInterface;
abstract class AbstractTransportFactoryTestCase extends TestCase
{
protected const USER = 'u$er';
protected const PASSWORD = 'pa$s';
abstract public function getFactory(): TransportFa | {
"filepath": "src/Symfony/Component/Mailer/Test/AbstractTransportFactoryTestCase.php",
"language": "php",
"file_size": 2430,
"cut_index": 563,
"middle_length": 229
} |
part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Test\Constraint;
use PHPUnit\Framework\Constraint\Constraint;
use Symfo... | t', $this->expectedValue);
}
/**
* @param MessageEvents $events
*/
protected function matches($events): bool
{
return $this->expectedValue === $this->countEmails($events);
}
/**
* @param MessageEvents $event | null,
private bool $queued = false,
) {
}
public function toString(): string
{
return \sprintf('%shas %s "%d" emails', $this->transport ? $this->transport.' ' : '', $this->queued ? 'queued' : 'sen | {
"filepath": "src/Symfony/Component/Mailer/Test/Constraint/EmailCount.php",
"language": "php",
"file_size": 1622,
"cut_index": 537,
"middle_length": 229
} |
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Test\Constraint;
use PHPUnit\Framework\Constraint\C... | otected function matches($event): bool
{
return $event->isQueued();
}
/**
* @param MessageEvent $event
*/
protected function failureDescription($event): string
{
return 'the Email '.$this->toString();
}
}
| /**
* @param MessageEvent $event
*/
pr | {
"filepath": "src/Symfony/Component/Mailer/Test/Constraint/EmailIsQueued.php",
"language": "php",
"file_size": 825,
"cut_index": 517,
"middle_length": 52
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.