Skip to content

Commit

Permalink
Merge branch '4.4'
Browse files Browse the repository at this point in the history
* 4.4:
  bumped Symfony version to 4.3.0
  updated VERSION for 4.3.0-RC1
  updated CHANGELOG for 4.3.0-RC1
  Create an abstract HTTP transport and extend it in all HTTP transports
  Updated "experimental" annotations for 4.3
  • Loading branch information
nicolas-grekas committed May 28, 2019
2 parents 8869eb3 + 94fd42c commit 65981cc
Show file tree
Hide file tree
Showing 58 changed files with 124 additions and 71 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG-4.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ in 4.3 minor versions.
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v4.3.0...v4.3.1

* 4.3.0-RC1 (2019-05-28)

* bug #31650 Create an abstract HTTP transport and extend it in all HTTP transports (bocharsky-bw)
* feature #31641 [HttpClient] make $response->getInfo('debug') return extended logs about the HTTP transaction (nicolas-grekas)
* feature #31571 [Contracts] split in one package per sub-contracts (nicolas-grekas)
* bug #31625 [Messenger] Disable the SchemaAssetsFilter when setup the transport (vincenttouzet)
* bug #31621 [Messenger] Fix missing auto_setup for RedisTransport (chalasr)
* bug #31584 [Workflow] Do not trigger extra guards (lyrixx)
* bug #31632 [Messenger] Use "real" memory usage to honor --memory-limit (chalasr)
* bug #31610 [HttpClient] fix handling exceptions thrown before first mock chunk (nicolas-grekas)
* bug #31615 Allow WrappedListener to describe uncallable listeners (derrabus)
* bug #31599 [Translation] Fixed issue with new vs old TranslatorInterface in TranslationDataCollector (althaus)
* bug #31565 [Mime][HttpFoundation] Added mime type audio/x-hx-aac-adts (ifaridjalilov)
* bug #31591 [FrameworkBundle] fix named autowiring aliases for TagAwareCacheInterface (nicolas-grekas)
* bug #31590 [Cache] improve logged messages (nicolas-grekas)
* bug #31586 [HttpClient] display proper error message on TransportException when curl is used (nicolas-grekas)
* bug #31349 [WebProfilerBundle] Use absolute URL for profiler links (Alumbrados)
* bug #31541 [DI] fix using bindings with locators of service subscribers (nicolas-grekas)
* bug #31568 [Process] Fix infinite waiting for stopped process (mshavliuk)

* 4.3.0-BETA2 (2019-05-22)

* bug #31569 [HttpClient] Only use CURLMOPT_MAX_HOST_CONNECTIONS & CURL_VERSION_HTTP2 if defined (GawainLynch)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
class DoctrineTransactionMiddleware implements MiddlewareInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,20 @@

use Psr\Log\LoggerInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpClient\HttpClient;
use Symfony\Component\Mailer\Exception\TransportException;
use Symfony\Component\Mailer\SentMessage;
use Symfony\Component\Mailer\Transport\AbstractTransport;
use Symfony\Component\Mailer\Transport\Http\AbstractHttpTransport;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
* @author Kevin Verschaeve
*
* @experimental in 4.3
*/
class SesTransport extends AbstractTransport
class SesTransport extends AbstractHttpTransport
{
private const ENDPOINT = 'https://email.%region%.amazonaws.com';

private $client;
private $accessKey;
private $secretKey;
private $region;
Expand All @@ -38,12 +36,11 @@ class SesTransport extends AbstractTransport
*/
public function __construct(string $accessKey, string $secretKey, string $region = null, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null)
{
$this->client = $client ?? HttpClient::create();
$this->accessKey = $accessKey;
$this->secretKey = $secretKey;
$this->region = $region ?: 'eu-west-1';

parent::__construct($dispatcher, $logger);
parent::__construct($client, $dispatcher, $logger);
}

protected function doSend(SentMessage $message): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,26 @@

use Psr\Log\LoggerInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpClient\HttpClient;
use Symfony\Component\Mailer\Exception\TransportException;
use Symfony\Component\Mailer\SentMessage;
use Symfony\Component\Mailer\Transport\AbstractTransport;
use Symfony\Component\Mailer\Transport\Http\AbstractHttpTransport;
use Symfony\Contracts\HttpClient\HttpClientInterface;

/**
* @author Kevin Verschaeve
*
* @experimental in 4.3
*/
class MandrillTransport extends AbstractTransport
class MandrillTransport extends AbstractHttpTransport
{
private const ENDPOINT = 'https://mandrillapp.com/api/1.0/messages/send-raw.json';
private $client;
private $key;

public function __construct(string $key, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null)
{
$this->key = $key;
$this->client = $client ?? HttpClient::create();

parent::__construct($dispatcher, $logger);
parent::__construct($client, $dispatcher, $logger);
}

protected function doSend(SentMessage $message): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@

use Psr\Log\LoggerInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpClient\HttpClient;
use Symfony\Component\Mailer\Exception\TransportException;
use Symfony\Component\Mailer\SentMessage;
use Symfony\Component\Mailer\Transport\AbstractTransport;
use Symfony\Component\Mailer\Transport\Http\AbstractHttpTransport;
use Symfony\Component\Mime\Part\DataPart;
use Symfony\Component\Mime\Part\Multipart\FormDataPart;
use Symfony\Contracts\HttpClient\HttpClientInterface;
Expand All @@ -26,20 +25,18 @@
*
* @experimental in 4.3
*/
class MailgunTransport extends AbstractTransport
class MailgunTransport extends AbstractHttpTransport
{
private const ENDPOINT = 'https://api.mailgun.net/v3/%domain%/messages.mime';
private $key;
private $domain;
private $client;

public function __construct(string $key, string $domain, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null)
{
$this->key = $key;
$this->domain = $domain;
$this->client = $client ?? HttpClient::create();

parent::__construct($dispatcher, $logger);
parent::__construct($client, $dispatcher, $logger);
}

protected function doSend(SentMessage $message): void
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?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\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\HttpClient\HttpClientInterface;

/**
* @author Victor Bocharsky <victor@symfonycasts.com>
*
* @experimental in 4.3
*/
abstract class AbstractHttpTransport extends AbstractTransport
{
protected $client;

public function __construct(HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null)
{
$this->client = $client;
if (null === $client) {
if (!class_exists(HttpClient::class)) {
throw new \LogicException(sprintf('You cannot use "%s" as the HttpClient component is not installed. Try running "composer require symfony/http-client".', __CLASS__));
}

$this->client = HttpClient::create();
}

parent::__construct($dispatcher, $logger);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/**
* @author Samuel Roze <samuel.roze@gmail.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
class ConsumeMessagesCommand extends Command
{
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Messenger/Command/DebugCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*
* @author Roland Franssen <franssen.roland@gmail.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
class DebugCommand extends Command
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* @author Samuel Roze <samuel.roze@gmail.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
class MessengerDataCollector extends DataCollector implements LateDataCollectorInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/**
* @author Samuel Roze <samuel.roze@gmail.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
class MessengerPass implements CompilerPassInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Messenger/Envelope.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
final class Envelope
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @author Samuel Roze <samuel.roze@gmail.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
interface ExceptionInterface extends \Throwable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* @author Yonel Ceruto <yonelceruto@gmail.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* @author Roland Franssen <franssen.roland@gmail.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
class LogicException extends \LogicException implements ExceptionInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* @author Samuel Roze <samuel.roze@gmail.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
class NoHandlerForMessageException extends \LogicException implements ExceptionInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
class RuntimeException extends \RuntimeException implements ExceptionInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* @author Eric Masoero <em@studeal.fr>
*
* @experimental in 4.2
* @experimental in 4.3
*/
class TransportException extends RuntimeException
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
class ValidationFailedException extends \RuntimeException implements ExceptionInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Messenger/HandleTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
trait HandleTrait
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @author Nicolas Grekas <p@tchwork.com>
* @author Samuel Roze <samuel.roze@gmail.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
class HandlersLocator implements HandlersLocatorInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* @author Nicolas Grekas <p@tchwork.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
interface HandlersLocatorInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @author Samuel Roze <samuel.roze@gmail.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
interface MessageHandlerInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @author Samuel Roze <samuel.roze@gmail.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
interface MessageSubscriberInterface extends MessageHandlerInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Messenger/MessageBus.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @author Matthias Noback <matthiasnoback@gmail.com>
* @author Nicolas Grekas <p@tchwork.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
class MessageBus implements MessageBusInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Messenger/MessageBusInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* @author Samuel Roze <samuel.roze@gmail.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
interface MessageBusInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
class ActivationMiddleware implements MiddlewareInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/**
* @author Samuel Roze <samuel.roze@gmail.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
class HandleMessageMiddleware implements MiddlewareInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* @author Samuel Roze <samuel.roze@gmail.com>
*
* @experimental in 4.2
* @experimental in 4.3
*/
interface MiddlewareInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @author Samuel Roze <samuel.roze@gmail.com>
* @author Tobias Schultze <http://tobion.de>
*
* @experimental in 4.2
* @experimental in 4.3
*/
class SendMessageMiddleware implements MiddlewareInterface
{
Expand Down

0 comments on commit 65981cc

Please sign in to comment.