Merge branch '4.4'
* 4.4: add back possibility to use form themes without translations [HttpClient] fix Psr18Client handling of non-200 response codes [HttpClient] make Psr18Client implement relevant PSR-17 factories [WebProfilerBundle] fix FC with HttpFoundation v5 [OptionsResolver] fix adding $triggerDeprecation to Options::offsetGet() [Form] test case is not legacy Fix reporting unsilenced deprecations from insulated tests Changed EventDispatcherInterface dependency from Component to Contracts fix handling nested embeddables [WebProfilerBundle] Select default theme based on user preferences [FrameworkBundle] Allow dots in translation domains Added FormInterface to @return Form::getClickedButton docblock
This commit is contained in:
commit
03bfce6a40
@ -22,4 +22,9 @@ class DoctrineLoaderEmbed
|
||||
* @ORM\Column(length=25)
|
||||
*/
|
||||
public $embeddedMaxLength;
|
||||
|
||||
/**
|
||||
* @ORM\Embedded(class=DoctrineLoaderNestedEmbed::class)
|
||||
*/
|
||||
public $nestedEmbedded;
|
||||
}
|
||||
|
@ -0,0 +1,25 @@
|
||||
<?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\Bridge\Doctrine\Tests\Fixtures;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Embeddable()
|
||||
*/
|
||||
class DoctrineLoaderNestedEmbed
|
||||
{
|
||||
/**
|
||||
* @ORM\Column(length=27)
|
||||
*/
|
||||
public $nestedEmbeddedMaxLength;
|
||||
}
|
@ -16,6 +16,7 @@ use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
|
||||
use Symfony\Bridge\Doctrine\Tests\Fixtures\BaseUser;
|
||||
use Symfony\Bridge\Doctrine\Tests\Fixtures\DoctrineLoaderEmbed;
|
||||
use Symfony\Bridge\Doctrine\Tests\Fixtures\DoctrineLoaderEntity;
|
||||
use Symfony\Bridge\Doctrine\Tests\Fixtures\DoctrineLoaderNestedEmbed;
|
||||
use Symfony\Bridge\Doctrine\Tests\Fixtures\DoctrineLoaderParentEntity;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Symfony\Bridge\Doctrine\Validator\DoctrineLoader;
|
||||
@ -109,6 +110,20 @@ class DoctrineLoaderTest extends TestCase
|
||||
$this->assertInstanceOf(Length::class, $embeddedMaxLengthConstraints[0]);
|
||||
$this->assertSame(25, $embeddedMaxLengthConstraints[0]->max);
|
||||
|
||||
$nestedEmbeddedMetadata = $embeddedClassMetadata->getPropertyMetadata('nestedEmbedded');
|
||||
$this->assertCount(1, $nestedEmbeddedMetadata);
|
||||
$this->assertSame(CascadingStrategy::CASCADE, $nestedEmbeddedMetadata[0]->getCascadingStrategy());
|
||||
$this->assertSame(TraversalStrategy::IMPLICIT, $nestedEmbeddedMetadata[0]->getTraversalStrategy());
|
||||
|
||||
$nestedEmbeddedClassMetadata = $validator->getMetadataFor(new DoctrineLoaderNestedEmbed());
|
||||
|
||||
$nestedEmbeddedMaxLengthMetadata = $nestedEmbeddedClassMetadata->getPropertyMetadata('nestedEmbeddedMaxLength');
|
||||
$this->assertCount(1, $nestedEmbeddedMaxLengthMetadata);
|
||||
$nestedEmbeddedMaxLengthConstraints = $nestedEmbeddedMaxLengthMetadata[0]->getConstraints();
|
||||
$this->assertCount(1, $nestedEmbeddedMaxLengthConstraints);
|
||||
$this->assertInstanceOf(Length::class, $nestedEmbeddedMaxLengthConstraints[0]);
|
||||
$this->assertSame(27, $nestedEmbeddedMaxLengthConstraints[0]->max);
|
||||
|
||||
$this->assertCount(0, $classMetadata->getPropertyMetadata('guidField'));
|
||||
$this->assertCount(0, $classMetadata->getPropertyMetadata('simpleArrayField'));
|
||||
|
||||
|
@ -79,7 +79,7 @@ final class DoctrineLoader implements LoaderInterface
|
||||
|
||||
$constraint = $this->getLengthConstraint($metadata, $mapping['fieldName']);
|
||||
if (null === $constraint) {
|
||||
if (isset($mapping['originalClass'])) {
|
||||
if (isset($mapping['originalClass']) && false === strpos($mapping['declaredField'], '.')) {
|
||||
$metadata->addPropertyConstraint($mapping['declaredField'], new Valid());
|
||||
} elseif (property_exists($className, $mapping['fieldName'])) {
|
||||
$metadata->addPropertyConstraint($mapping['fieldName'], new Length(['max' => $mapping['length']]));
|
||||
|
@ -284,7 +284,8 @@ class SymfonyTestsListenerTrait
|
||||
foreach ($deprecations ? unserialize($deprecations) : array() as $deprecation) {
|
||||
$error = serialize(array('deprecation' => $deprecation[1], 'class' => $className, 'method' => $test->getName(false), 'triggering_file' => isset($deprecation[2]) ? $deprecation[2] : null));
|
||||
if ($deprecation[0]) {
|
||||
@trigger_error($error, E_USER_DEPRECATED);
|
||||
// unsilenced on purpose
|
||||
trigger_error($error, E_USER_DEPRECATED);
|
||||
} else {
|
||||
@trigger_error($error, E_USER_DEPRECATED);
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.2.9",
|
||||
"symfony/translation-contracts": "^1.1",
|
||||
"twig/twig": "^1.41|^2.10"
|
||||
},
|
||||
"require-dev": {
|
||||
|
@ -1022,14 +1022,15 @@ class FrameworkExtension extends Extension
|
||||
->followLinks()
|
||||
->files()
|
||||
->filter(function (\SplFileInfo $file) {
|
||||
return 2 === substr_count($file->getBasename(), '.') && preg_match('/\.\w+$/', $file->getBasename());
|
||||
return 2 <= substr_count($file->getBasename(), '.') && preg_match('/\.\w+$/', $file->getBasename());
|
||||
})
|
||||
->in($dirs)
|
||||
->sortByName()
|
||||
;
|
||||
|
||||
foreach ($finder as $file) {
|
||||
list(, $locale) = explode('.', $file->getBasename(), 3);
|
||||
$fileNameParts = explode('.', basename($file));
|
||||
$locale = $fileNameParts[\count($fileNameParts) - 2];
|
||||
if (!isset($files[$locale])) {
|
||||
$files[$locale] = [];
|
||||
}
|
||||
|
@ -0,0 +1,3 @@
|
||||
domain:
|
||||
with:
|
||||
dots: It works!
|
@ -719,6 +719,11 @@ abstract class FrameworkExtensionTest extends TestCase
|
||||
$files,
|
||||
'->registerTranslatorConfiguration() finds translation resources in default path'
|
||||
);
|
||||
$this->assertContains(
|
||||
strtr(__DIR__.'/Fixtures/translations/domain.with.dots.en.yml', '/', \DIRECTORY_SEPARATOR),
|
||||
$files,
|
||||
'->registerTranslatorConfiguration() finds translation resources with dots in domain'
|
||||
);
|
||||
|
||||
$calls = $container->getDefinition('translator.default')->getMethodCalls();
|
||||
$this->assertEquals(['fr'], $calls[1][1][0]);
|
||||
|
@ -0,0 +1 @@
|
||||
message: It works!
|
@ -335,6 +335,21 @@ class TranslatorTest extends TestCase
|
||||
$this->assertEquals('répertoire', $translator->trans('folder'));
|
||||
}
|
||||
|
||||
public function testLoadingTranslationFilesWithDotsInMessageDomain()
|
||||
{
|
||||
$loader = new \Symfony\Component\Translation\Loader\YamlFileLoader();
|
||||
$resourceFiles = [
|
||||
'en' => [
|
||||
__DIR__.'/../Fixtures/Resources/translations/domain.with.dots.en.yml',
|
||||
],
|
||||
];
|
||||
|
||||
$translator = $this->getTranslator($loader, ['cache_dir' => $this->tmpDir, 'resource_files' => $resourceFiles], 'yml');
|
||||
$translator->setLocale('en');
|
||||
$translator->setFallbackLocales(['fr']);
|
||||
$this->assertEquals('It works!', $translator->trans('message', [], 'domain.with.dots'));
|
||||
}
|
||||
|
||||
private function createTranslator($loader, $options, $translatorClass = '\Symfony\Bundle\FrameworkBundle\Translation\Translator', $loaderFomat = 'loader', $defaultLocale = 'en')
|
||||
{
|
||||
if (null === $defaultLocale) {
|
||||
|
@ -165,7 +165,10 @@ class Translator extends BaseTranslator implements WarmableInterface
|
||||
foreach ($filesByLocale as $locale => $files) {
|
||||
foreach ($files as $key => $file) {
|
||||
// filename is domain.locale.format
|
||||
list($domain, $locale, $format) = explode('.', basename($file), 3);
|
||||
$fileNameParts = explode('.', basename($file));
|
||||
$format = array_pop($fileNameParts);
|
||||
$locale = array_pop($fileNameParts);
|
||||
$domain = implode('.', $fileNameParts);
|
||||
$this->addResource($format, $file, $locale, $domain);
|
||||
}
|
||||
}
|
||||
|
@ -14,8 +14,11 @@
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<script async>
|
||||
document.body.classList.add(localStorage.getItem('symfony/profiler/theme') || 'theme-light', localStorage.getItem('symfony/profiler/width') || 'width-normal');
|
||||
<script>
|
||||
document.body.classList.add(
|
||||
localStorage.getItem('symfony/profiler/theme') || (matchMedia('(prefers-color-scheme: dark)').matches ? 'theme-dark' : 'theme-light'),
|
||||
localStorage.getItem('symfony/profiler/width') || 'width-normal'
|
||||
);
|
||||
</script>
|
||||
|
||||
{% block body '' %}
|
||||
|
@ -94,7 +94,7 @@ class Form implements \IteratorAggregate, FormInterface, ClearableErrorsInterfac
|
||||
private $submitted = false;
|
||||
|
||||
/**
|
||||
* @var ClickableInterface|null The button that was used to submit the form
|
||||
* @var FormInterface|ClickableInterface|null The button that was used to submit the form
|
||||
*/
|
||||
private $clickedButton;
|
||||
|
||||
@ -752,7 +752,7 @@ class Form implements \IteratorAggregate, FormInterface, ClearableErrorsInterfac
|
||||
/**
|
||||
* Returns the button that was used to submit the form.
|
||||
*
|
||||
* @return ClickableInterface|null
|
||||
* @return FormInterface|ClickableInterface|null
|
||||
*/
|
||||
public function getClickedButton()
|
||||
{
|
||||
|
@ -4,6 +4,7 @@ CHANGELOG
|
||||
4.4.0
|
||||
-----
|
||||
|
||||
* made `Psr18Client` implement relevant PSR-17 factories
|
||||
* added `$response->cancel()`
|
||||
|
||||
4.3.0
|
||||
|
@ -12,16 +12,26 @@
|
||||
namespace Symfony\Component\HttpClient;
|
||||
|
||||
use Nyholm\Psr7\Factory\Psr17Factory;
|
||||
use Nyholm\Psr7\Request;
|
||||
use Nyholm\Psr7\Uri;
|
||||
use Psr\Http\Client\ClientInterface;
|
||||
use Psr\Http\Client\NetworkExceptionInterface;
|
||||
use Psr\Http\Client\RequestExceptionInterface;
|
||||
use Psr\Http\Message\RequestFactoryInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseFactoryInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\StreamFactoryInterface;
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
use Psr\Http\Message\UriFactoryInterface;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
|
||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
|
||||
if (!interface_exists(RequestFactoryInterface::class)) {
|
||||
throw new \LogicException('You cannot use the "Symfony\Component\HttpClient\Psr18Client" as the "psr/http-factory" package is not installed. Try running "composer require nyholm/psr7".');
|
||||
}
|
||||
|
||||
if (!interface_exists(ClientInterface::class)) {
|
||||
throw new \LogicException('You cannot use the "Symfony\Component\HttpClient\Psr18Client" as the "psr/http-client" package is not installed. Try running "composer require psr/http-client".');
|
||||
}
|
||||
@ -37,7 +47,7 @@ if (!interface_exists(ClientInterface::class)) {
|
||||
*
|
||||
* @experimental in 4.3
|
||||
*/
|
||||
final class Psr18Client implements ClientInterface
|
||||
final class Psr18Client implements ClientInterface, RequestFactoryInterface, StreamFactoryInterface, UriFactoryInterface
|
||||
{
|
||||
private $client;
|
||||
private $responseFactory;
|
||||
@ -62,6 +72,9 @@ final class Psr18Client implements ClientInterface
|
||||
$this->streamFactory = $this->streamFactory ?? $psr17Factory;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function sendRequest(RequestInterface $request): ResponseInterface
|
||||
{
|
||||
try {
|
||||
@ -73,13 +86,13 @@ final class Psr18Client implements ClientInterface
|
||||
|
||||
$psrResponse = $this->responseFactory->createResponse($response->getStatusCode());
|
||||
|
||||
foreach ($response->getHeaders() as $name => $values) {
|
||||
foreach ($response->getHeaders(false) as $name => $values) {
|
||||
foreach ($values as $value) {
|
||||
$psrResponse = $psrResponse->withAddedHeader($name, $value);
|
||||
}
|
||||
}
|
||||
|
||||
return $psrResponse->withBody($this->streamFactory->createStream($response->getContent()));
|
||||
return $psrResponse->withBody($this->streamFactory->createStream($response->getContent(false)));
|
||||
} catch (TransportExceptionInterface $e) {
|
||||
if ($e instanceof \InvalidArgumentException) {
|
||||
throw new Psr18RequestException($e, $request);
|
||||
@ -88,6 +101,62 @@ final class Psr18Client implements ClientInterface
|
||||
throw new Psr18NetworkException($e, $request);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function createRequest(string $method, $uri): RequestInterface
|
||||
{
|
||||
if ($this->responseFactory instanceof RequestFactoryInterface) {
|
||||
return $this->responseFactory->createRequest($method, $uri);
|
||||
}
|
||||
|
||||
if (!class_exists(Request::class)) {
|
||||
throw new \LogicException(sprintf('You cannot use "%s()" as the "nyholm/psr7" package is not installed. Try running "composer require nyholm/psr7".', __METHOD__));
|
||||
}
|
||||
|
||||
return new Request($method, $uri);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function createStream(string $content = ''): StreamInterface
|
||||
{
|
||||
return $this->streamFactory->createStream($content);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function createStreamFromFile(string $filename, string $mode = 'r'): StreamInterface
|
||||
{
|
||||
return $this->streamFactory->createStreamFromFile($filename, $mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function createStreamFromResource($resource): StreamInterface
|
||||
{
|
||||
return $this->streamFactory->createStreamFromResource($resource);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function createUri(string $uri = ''): UriInterface
|
||||
{
|
||||
if ($this->responseFactory instanceof UriFactoryInterface) {
|
||||
return $this->responseFactory->createUri($uri);
|
||||
}
|
||||
|
||||
if (!class_exists(Uri::class)) {
|
||||
throw new \LogicException(sprintf('You cannot use "%s()" as the "nyholm/psr7" package is not installed. Try running "composer require nyholm/psr7".', __METHOD__));
|
||||
}
|
||||
|
||||
return new Uri($uri);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -74,4 +74,13 @@ class Psr18ClientTest extends TestCase
|
||||
$this->expectException(Psr18RequestException::class);
|
||||
$client->sendRequest($factory->createRequest('BAD.METHOD', 'http://localhost:8057'));
|
||||
}
|
||||
|
||||
public function test404()
|
||||
{
|
||||
$factory = new Psr17Factory();
|
||||
$client = new Psr18Client(new NativeHttpClient());
|
||||
|
||||
$response = $client->sendRequest($factory->createRequest('GET', 'http://localhost:8057/404'));
|
||||
$this->assertSame(404, $response->getStatusCode());
|
||||
}
|
||||
}
|
||||
|
@ -12,11 +12,11 @@
|
||||
namespace Symfony\Component\Mailer\Bridge\Amazon\Http\Api;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Mailer\Exception\TransportException;
|
||||
use Symfony\Component\Mailer\SmtpEnvelope;
|
||||
use Symfony\Component\Mailer\Transport\Http\Api\AbstractApiTransport;
|
||||
use Symfony\Component\Mime\Email;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
|
||||
/**
|
||||
|
@ -12,10 +12,10 @@
|
||||
namespace Symfony\Component\Mailer\Bridge\Amazon\Http;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Mailer\Exception\TransportException;
|
||||
use Symfony\Component\Mailer\SentMessage;
|
||||
use Symfony\Component\Mailer\Transport\Http\AbstractHttpTransport;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
|
||||
/**
|
||||
|
@ -12,8 +12,8 @@
|
||||
namespace Symfony\Component\Mailer\Bridge\Amazon\Smtp;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
|
||||
/**
|
||||
* @author Kevin Verschaeve
|
||||
|
@ -12,8 +12,8 @@
|
||||
namespace Symfony\Component\Mailer\Bridge\Google\Smtp;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
|
||||
/**
|
||||
* @author Kevin Verschaeve
|
||||
|
@ -12,11 +12,11 @@
|
||||
namespace Symfony\Component\Mailer\Bridge\Mailchimp\Http\Api;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Mailer\Exception\TransportException;
|
||||
use Symfony\Component\Mailer\SmtpEnvelope;
|
||||
use Symfony\Component\Mailer\Transport\Http\Api\AbstractApiTransport;
|
||||
use Symfony\Component\Mime\Email;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
|
||||
/**
|
||||
|
@ -12,10 +12,10 @@
|
||||
namespace Symfony\Component\Mailer\Bridge\Mailchimp\Http;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Mailer\Exception\TransportException;
|
||||
use Symfony\Component\Mailer\SentMessage;
|
||||
use Symfony\Component\Mailer\Transport\Http\AbstractHttpTransport;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
|
||||
/**
|
||||
|
@ -12,8 +12,8 @@
|
||||
namespace Symfony\Component\Mailer\Bridge\Mailchimp\Smtp;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
|
||||
/**
|
||||
* @author Kevin Verschaeve
|
||||
|
@ -12,12 +12,12 @@
|
||||
namespace Symfony\Component\Mailer\Bridge\Mailgun\Http\Api;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Mailer\Exception\TransportException;
|
||||
use Symfony\Component\Mailer\SmtpEnvelope;
|
||||
use Symfony\Component\Mailer\Transport\Http\Api\AbstractApiTransport;
|
||||
use Symfony\Component\Mime\Email;
|
||||
use Symfony\Component\Mime\Part\Multipart\FormDataPart;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
|
||||
/**
|
||||
|
@ -12,12 +12,12 @@
|
||||
namespace Symfony\Component\Mailer\Bridge\Mailgun\Http;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Mailer\Exception\TransportException;
|
||||
use Symfony\Component\Mailer\SentMessage;
|
||||
use Symfony\Component\Mailer\Transport\Http\AbstractHttpTransport;
|
||||
use Symfony\Component\Mime\Part\DataPart;
|
||||
use Symfony\Component\Mime\Part\Multipart\FormDataPart;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
|
||||
/**
|
||||
|
@ -12,8 +12,8 @@
|
||||
namespace Symfony\Component\Mailer\Bridge\Mailgun\Smtp;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
|
||||
/**
|
||||
* @author Kevin Verschaeve
|
||||
|
@ -12,11 +12,11 @@
|
||||
namespace Symfony\Component\Mailer\Bridge\Postmark\Http\Api;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Mailer\Exception\TransportException;
|
||||
use Symfony\Component\Mailer\SmtpEnvelope;
|
||||
use Symfony\Component\Mailer\Transport\Http\Api\AbstractApiTransport;
|
||||
use Symfony\Component\Mime\Email;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
|
||||
/**
|
||||
|
@ -12,8 +12,8 @@
|
||||
namespace Symfony\Component\Mailer\Bridge\Postmark\Smtp;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
|
||||
/**
|
||||
* @author Kevin Verschaeve
|
||||
|
@ -12,12 +12,12 @@
|
||||
namespace Symfony\Component\Mailer\Bridge\Sendgrid\Http\Api;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Mailer\Exception\TransportException;
|
||||
use Symfony\Component\Mailer\SmtpEnvelope;
|
||||
use Symfony\Component\Mailer\Transport\Http\Api\AbstractApiTransport;
|
||||
use Symfony\Component\Mime\Address;
|
||||
use Symfony\Component\Mime\Email;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
|
||||
/**
|
||||
|
@ -12,8 +12,8 @@
|
||||
namespace Symfony\Component\Mailer\Bridge\Sendgrid\Smtp;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
|
||||
/**
|
||||
* @author Kevin Verschaeve
|
||||
|
@ -1,6 +1,12 @@
|
||||
CHANGELOG
|
||||
=========
|
||||
|
||||
4.4.0
|
||||
-----
|
||||
|
||||
* [BC BREAK] Transports depend on `Symfony\Contracts\EventDispatcher\EventDispatcherInterface`
|
||||
instead of `Symfony\Component\EventDispatcher\EventDispatcherInterface`.
|
||||
|
||||
4.3.0
|
||||
-----
|
||||
|
||||
|
@ -13,7 +13,6 @@ namespace Symfony\Component\Mailer\Tests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Mailer\Bridge\Amazon;
|
||||
use Symfony\Component\Mailer\Bridge\Google;
|
||||
use Symfony\Component\Mailer\Bridge\Mailchimp;
|
||||
@ -23,6 +22,7 @@ use Symfony\Component\Mailer\Bridge\Sendgrid;
|
||||
use Symfony\Component\Mailer\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\Mailer\Exception\LogicException;
|
||||
use Symfony\Component\Mailer\Transport;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
|
||||
class TransportTest extends TestCase
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Component\Mailer;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Mailer\Bridge\Amazon;
|
||||
use Symfony\Component\Mailer\Bridge\Google;
|
||||
use Symfony\Component\Mailer\Bridge\Mailchimp;
|
||||
@ -22,6 +21,7 @@ use Symfony\Component\Mailer\Bridge\Sendgrid;
|
||||
use Symfony\Component\Mailer\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\Mailer\Exception\LogicException;
|
||||
use Symfony\Component\Mailer\Transport\TransportInterface;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
|
||||
/**
|
||||
|
@ -14,7 +14,6 @@ namespace Symfony\Component\Mailer\Transport;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Psr\Log\NullLogger;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Mailer\DelayedSmtpEnvelope;
|
||||
use Symfony\Component\Mailer\Event\MessageEvent;
|
||||
use Symfony\Component\Mailer\Exception\TransportException;
|
||||
@ -22,6 +21,7 @@ use Symfony\Component\Mailer\SentMessage;
|
||||
use Symfony\Component\Mailer\SmtpEnvelope;
|
||||
use Symfony\Component\Mime\Address;
|
||||
use Symfony\Component\Mime\RawMessage;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
|
||||
/**
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
|
@ -12,9 +12,9 @@
|
||||
namespace Symfony\Component\Mailer\Transport\Http;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\HttpClient\HttpClient;
|
||||
use Symfony\Component\Mailer\Transport\AbstractTransport;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
|
||||
/**
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Component\Mailer\Transport\Http\Api;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\HttpClient\HttpClient;
|
||||
use Symfony\Component\Mailer\Exception\RuntimeException;
|
||||
use Symfony\Component\Mailer\SentMessage;
|
||||
@ -21,6 +20,7 @@ use Symfony\Component\Mailer\Transport\AbstractTransport;
|
||||
use Symfony\Component\Mime\Address;
|
||||
use Symfony\Component\Mime\Email;
|
||||
use Symfony\Component\Mime\MessageConverter;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
|
||||
/**
|
||||
|
@ -12,13 +12,13 @@
|
||||
namespace Symfony\Component\Mailer\Transport;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Mailer\SentMessage;
|
||||
use Symfony\Component\Mailer\SmtpEnvelope;
|
||||
use Symfony\Component\Mailer\Transport\Smtp\SmtpTransport;
|
||||
use Symfony\Component\Mailer\Transport\Smtp\Stream\AbstractStream;
|
||||
use Symfony\Component\Mailer\Transport\Smtp\Stream\ProcessStream;
|
||||
use Symfony\Component\Mime\RawMessage;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
|
||||
/**
|
||||
* SendmailTransport for sending mail through a Sendmail/Postfix (etc..) binary.
|
||||
|
@ -12,11 +12,11 @@
|
||||
namespace Symfony\Component\Mailer\Transport\Smtp;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Mailer\Exception\TransportException;
|
||||
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
|
||||
use Symfony\Component\Mailer\Transport\Smtp\Auth\AuthenticatorInterface;
|
||||
use Symfony\Component\Mailer\Transport\Smtp\Stream\SocketStream;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
|
||||
/**
|
||||
* Sends Emails over SMTP with ESMTP support.
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Component\Mailer\Transport\Smtp;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\Mailer\Exception\LogicException;
|
||||
use Symfony\Component\Mailer\Exception\TransportException;
|
||||
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
|
||||
@ -22,6 +21,7 @@ use Symfony\Component\Mailer\Transport\AbstractTransport;
|
||||
use Symfony\Component\Mailer\Transport\Smtp\Stream\AbstractStream;
|
||||
use Symfony\Component\Mailer\Transport\Smtp\Stream\SocketStream;
|
||||
use Symfony\Component\Mime\RawMessage;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
|
||||
/**
|
||||
* Sends emails over SMTP.
|
||||
|
@ -16,8 +16,6 @@ namespace Symfony\Component\OptionsResolver;
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
* @author Tobias Schultze <http://tobion.de>
|
||||
*
|
||||
* @method mixed offsetGet(string $option, bool $triggerDeprecation = true)
|
||||
*/
|
||||
interface Options extends \ArrayAccess, \Countable
|
||||
{
|
||||
|
Reference in New Issue
Block a user