8000 Merge branch '4.3' into 4.4 · symfony/symfony@94fd42c · GitHub
[go: up one dir, main page]

Skip to content

Commit 94fd42c

Browse files
Merge branch '4.3' into 4.4
* 4.3: 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
2 parents 2c9a196 + 33e743b commit 94fd42c

File tree

58 files changed

+124
-71
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+124
-71
lines changed

CHANGELOG-4.3.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,26 @@ in 4.3 minor versions.
77
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
88
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v4.3.0...v4.3.1
99

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

1232
* bug #31569 [HttpClient] Only use CURLMOPT_MAX_HOST_CONNECTIONS & CURL_VERSION_HTTP2 if defined (GawainLynch)

src/Symfony/Bridge/Doctrine/Messenger/DoctrineTransactionMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*
2323
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
2424
*
25-
* @experimental in 4.2
25+
* @experimental in 4.3
2626
*/
2727
class DoctrineTransactionMiddleware implements MiddlewareInterface
2828
{

src/Symfony/Component/Mailer/Bridge/Amazon/Http/SesTransport.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,20 @@
1313

1414
use Psr\Log\LoggerInterface;
1515
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
16-
use Symfony\Component\HttpClient\HttpClient;
1716
use Symfony\Component\Mailer\Exception\TransportException;
1817
use Symfony\Component\Mailer\SentMessage;
19-
use Symfony\Component\Mailer\Transport\AbstractTransport;
18+
use Symfony\Component\Mailer\Transport\Http\AbstractHttpTransport;
2019
use Symfony\Contracts\HttpClient\HttpClientInterface;
2120

2221
/**
2322
* @author Kevin Verschaeve
2423
*
2524
* @experimental in 4.3
2625
*/
27-
class SesTransport extends AbstractTransport
26+
class SesTransport extends AbstractHttpTransport
2827
{
2928
private const ENDPOINT = 'https://email.%region%.amazonaws.com';
3029

31-
private $client;
3230
private $accessKey;
3331
private $secretKey;
3432
private $region;
@@ -38,12 +36,11 @@ class SesTransport extends AbstractTransport
3836
*/
3937
public function __construct(string $accessKey, string $secretKey, string $region = null, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null)
4038
{
41-
$this->client = $client ?? HttpClient::create();
4239
$this->accessKey = $accessKey;
4340
$this->secretKey = $secretKey;
4441
$this->region = $region ?: 'eu-west-1';
4542

46-
parent::__construct($dispatcher, $logger);
43+
parent::__construct($client, $dispatcher, $logger);
4744
}
4845

4946
protected function doSend(SentMessage $message): void

src/Symfony/Component/Mailer/Bridge/Mailchimp/Http/MandrillTransport.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,26 @@
1313

1414
use Psr\Log\LoggerInterface;
1515
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
16-
use Symfony\Component\HttpClient\HttpClient;
1716
use Symfony\Component\Mailer\Exception\TransportException;
1817
use Symfony\Component\Mailer\SentMessage;
19-
use Symfony\Component\Mailer\Transport\AbstractTransport;
18+
use Symfony\Component\Mailer\Transport\Http\AbstractHttpTransport;
2019
use Symfony\Contracts\HttpClient\HttpClientInterface;
2120

2221
/**
2322
* @author Kevin Verschaeve
2423
*
2524
* @experimental in 4.3
2625
*/
27-
class MandrillTransport extends AbstractTransport
26+
class MandrillTransport extends AbstractHttpTransport
2827
{
2928
private const ENDPOINT = 'https://mandrillapp.com/api/1.0/messages/send-raw.json';
30-
private $client;
3129
private $key;
3230

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

38-
parent::__construct($dispatcher, $logger);
35+
parent::__construct($client, $dispatcher, $logger);
3936
}
4037

4138
protected function doSend(SentMessage $message): void

src/Symfony/Component/Mailer/Bridge/Mailgun/Http/MailgunTransport.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@
1313

1414
use Psr\Log\LoggerInterface;
1515
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
16-
use Symfony\Component\HttpClient\HttpClient;
1716
use Symfony\Component\Mailer\Exception\TransportException;
1817
use Symfony\Component\Mailer\SentMessage;
19-
use Symfony\Component\Mailer\Transport\AbstractTransport;
18+
use Symfony\Component\Mailer\Transport\Http\AbstractHttpTransport;
2019
use Symfony\Component\Mime\Part\DataPart;
2120
use Symfony\Component\Mime\Part\Multipart\FormDataPart;
2221
use Symfony\Contracts\HttpClient\HttpClientInterface;
@@ -26,20 +25,18 @@
2625
*
2726
* @experimental in 4.3
2827
*/
29-
class MailgunTransport extends AbstractTransport
28+
class MailgunTransport extends AbstractHttpTransport
3029
{
3130
private const ENDPOINT = 'https://api.mailgun.net/v3/%domain%/messages.mime';
3231
private $key;
3332
private $domain;
34-
private $client;
3533

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

42-
parent::__construct($dispatcher, $logger);
39+
parent::__construct($client, $dispatcher, $logger);
4340
}
4441

4542
protected function doSend(SentMessage $message): void
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\Mailer\Transport\Http;
13+
14+
use Psr\Log\LoggerInterface;
15+
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
16+
use Symfony\Component\HttpClient\HttpClient;
17+
use Symfony\Component\Mailer\Transport\AbstractTransport;
18+
use Symfony\Contracts\HttpClient\HttpClientInterface;
19+
20+
/**
21+
* @author Victor Bocharsky <victor@symfonycasts.com>
22+
*
23+
* @experimental in 4.3
24+
*/
25+
abstract class AbstractHttpTransport extends AbstractTransport
26+
{
27+
protected $client;
28+
29+
public function __construct(HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null)
30+
{
31+
$this->client = $client;
32+
if (null === $client) {
33+
if (!class_exists(HttpClient::class)) {
34+
throw new \LogicException(sprintf('You cannot use "%s" as the HttpClient component is not installed. Try running "composer require symfony/http-client".', __CLASS__));
35+
}
36+
37+
$this->client = HttpClient::create();
38+
}
39+
40+
parent::__construct($dispatcher, $logger);
41+
}
42+
}

src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
/**
3535
* @author Samuel Roze <samuel.roze@gmail.com>
3636
*
37-
* @experimental in 4.2
37+
* @experimental in 4.3
3838
*/
3939
class ConsumeMessagesCommand extends Command
4040
{

src/Symfony/Component/Messenger/Command/DebugCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*
2424
* @author Roland Franssen <franssen.roland@gmail.com>
2525
*
26-
* @experimental in 4.2
26+
* @experimental in 4.3
2727
*/
2828
class DebugCommand extends Command
2929
{

src/Symfony/Component/Messenger/DataCollector/MessengerDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/**
2222
* @author Samuel Roze <samuel.roze@gmail.com>
2323
*
24-
* @experimental in 4.2
24+
* @experimental in 4.3
2525
*/
2626
class MessengerDataCollector extends DataCollector implements LateDataCollectorInterface
2727
{

src/Symfony/Component/Messenger/DependencyInjection/MessengerPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
/**
2929
* @author Samuel Roze <samuel.roze@gmail.com>
3030
*
31-
* @experimental in 4.2
31+
* @experimental in 4.3
3232
*/
3333
class MessengerPass implements CompilerPassInterface
3434
{

src/Symfony/Component/Messenger/Envelope.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*
1919
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
2020
*
21-
* @experimental in 4.2
21+
* @experimental in 4.3
2222
*/
2323
final class Envelope
2424
{

src/Symfony/Component/Messenger/Exception/ExceptionInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @author Samuel Roze <samuel.roze@gmail.com>
1818
*
19-
* @experimental in 4.2
19+
* @experimental in 4.3
2020
*/
2121
interface ExceptionInterface extends \Throwable
2222
{

src/Symfony/Component/Messenger/Exception/InvalidArgumentException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/**
1515
* @author Yonel Ceruto <yonelceruto@gmail.com>
1616
*
17-
* @experimental in 4.2
17+
* @experimental in 4.3
1818
*/
1919
class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
2020
{

src/Symfony/Component/Messenger/Exception/LogicException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/**
1515
* @author Roland Franssen <franssen.roland@gmail.com>
1616
*
17-
* @experimental in 4.2
17+
* @experimental in 4.3
1818
*/
1919
class LogicException extends \LogicException implements ExceptionInterface
2020
{

src/Symfony/Component/Messenger/Exception/NoHandlerForMessageException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/**
1515
* @author Samuel Roze <samuel.roze@gmail.com>
1616
*
17-
* @experimental in 4.2
17+
* @experimental in 4.3
1818
*/
1919
class NoHandlerForMessageException extends \LogicException implements ExceptionInterface
2020
{

src/Symfony/Component/Messenger/Exception/RuntimeException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/**
1515
* @author Fabien Potencier <fabien@symfony.com>
1616
*
17-
* @experimental in 4.2
17+
* @experimental in 4.3
1818
*/
1919
class RuntimeException extends \RuntimeException implements ExceptionInterface
2020
{

src/Symfony/Component/Messenger/Exception/TransportException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/**
1515
* @author Eric Masoero <em@studeal.fr>
1616
*
17-
* @experimental in 4.2
17+
* @experimental in 4.3
1818
*/
1919
class TransportException extends RuntimeException
2020
{

src/Symfony/Component/Messenger/Exception/ValidationFailedException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/**
1717
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
1818
*
19-
* @experimental in 4.2
19+
* @experimental in 4.3
2020
*/
2121
class ValidationFailedException extends \RuntimeException implements ExceptionInterface
2222
{

src/Symfony/Component/Messenger/HandleTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*
2020
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
2121
*
22-
* @experimental in 4.2
22+
* @experimental in 4.3
2323
*/
2424
trait HandleTrait
2525
{

src/Symfony/Component/Messenger/Handler/HandlersLocator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* @author Nicolas Grekas <p@tchwork.com>
2121
* @author Samuel Roze <samuel.roze@gmail.com>
2222
*
23-
* @experimental in 4.2
23+
* @experimental in 4.3
2424
*/
2525
class HandlersLocator implements HandlersLocatorInterface
2626
{

src/Symfony/Component/Messenger/Handler/HandlersLocatorInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*
1919
* @author Nicolas Grekas <p@tchwork.com>
2020
*
21-
* @experimental in 4.2
21+
* @experimental in 4.3
2222
*/
2323
interface HandlersLocatorInterface
2424
{

src/Symfony/Component/Messenger/Handler/MessageHandlerInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @author Samuel Roze <samuel.roze@gmail.com>
1818
*
19-
* @experimental in 4.2
19+
* @experimental in 4.3
2020
*/
2121
interface MessageHandlerInterface
2222
{

src/Symfony/Component/Messenger/Handler/MessageSubscriberInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @author Samuel Roze <samuel.roze@gmail.com>
1818
*
19-
* @experimental in 4.2
19+
* @experimental in 4.3
2020
*/
2121
interface MessageSubscriberInterface extends MessageHandlerInterface
2222
{

src/Symfony/Component/Messenger/MessageBus.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* @author Matthias Noback <matthiasnoback@gmail.com>
2020
* @author Nicolas Grekas <p@tchwork.com>
2121
*
22-
* @experimental in 4.2
22+
* @experimental in 4.3
2323
*/
2424
class MessageBus implements MessageBusInterface
2525
{

src/Symfony/Component/Messenger/MessageBusInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/**
1717
* @author Samuel Roze <samuel.roze@gmail.com>
1818
*
19-
* @experimental in 4.2
19+
* @experimental in 4.3
2020
*/
2121
interface MessageBusInterface
2222
{

src/Symfony/Component/Messenger/Middleware/ActivationMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*
1919
* @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
2020
*
21-
* @experimental in 4.2
21+
* @experimental in 4.3
2222
*/
2323
class ActivationMiddleware implements MiddlewareInterface
2424
{

src/Symfony/Component/Messenger/Middleware/HandleMessageMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/**
2424
* @author Samuel Roze <samuel.roze@gmail.com>
2525
*
26-
* @experimental in 4.2
26+
* @experimental in 4.3
2727
*/
2828
class HandleMessageMiddleware implements MiddlewareInterface
2929
{

src/Symfony/Component/Messenger/Middleware/MiddlewareInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/**
1717
* @author Samuel Roze <samuel.roze@gmail.com>
1818
*
19-
* @experimental in 4.2
19+
* @experimental in 4.3
2020
*/
2121
interface MiddlewareInterface
2222
{

src/Symfony/Component/Messenger/Middleware/SendMessageMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* @author Samuel Roze <samuel.roze@gmail.com>
2727
* @author Tobias Schultze <http://tobion.de>
2828
*
29-
* @experimental in 4.2
29+
* @experimental in 4.3
3030
*/
3131
class SendMessageMiddleware implements MiddlewareInterface
3232
{

0 commit comments

Comments
 (0)
0