diff --git a/CHANGELOG-5.2.md b/CHANGELOG-5.2.md
index f84a666111572..b3ee27e04730b 100644
--- a/CHANGELOG-5.2.md
+++ b/CHANGELOG-5.2.md
@@ -7,6 +7,47 @@ in 5.2 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/v5.2.0...v5.2.1
+* 5.2.13 (2021-07-27)
+
+ * bug #42270 [WebProfilerBundle] [WebProfiler] "empty" filter bugfix. Filter with name "empty" is not … (luzrain)
+
+* 5.2.12 (2021-07-26)
+
+ * bug #42212 [Lock] Handle lock with long key (jderusse)
+ * bug #42223 [Debug][ErrorHandler] Do not use the php80 polyfill (nicolas-grekas)
+ * bug #42207 [Console] fix table setHeaderTitle without headers (a1812)
+ * bug #42130 [Translation] fix fallback to Locale::getDefault() (nicolas-grekas)
+ * bug #42184 [Mailer] Make sure Http TransportException is not leaking (Nyholm)
+ * bug #42091 [Console] Run commands when implements SignalableCommandInterface without pcntl and they have'nt signals (PaolaRuby)
+ * bug #42150 [Form] Fix 'invalid_message' use in multiple ChoiceType (alexandre-daubois)
+ * bug #42183 [Notifier] Allow passing a previous throwable to exceptions (derrabus)
+ * bug #42182 [Notifier] Make sure Http TransportException is not leaking (Nyholm)
+ * bug #42173 [Messenger] [Redis] Fix auth option wrongly considered invalid (chalasr)
+ * bug #42174 Indicate compatibility with psr/log 2 and 3 (derrabus)
+ * bug #42112 [HttpFoundation] fix FileBag under PHP 8.1 (alexpott)
+ * bug #42131 [PhpUnitBridge] Fix composer resolution on Windows (Rainrider)
+ * bug #42097 [DependencyInjection] Support for intersection types (derrabus)
+ * bug #42114 [HttpFoundation] Fix return types of SessionHandler::gc() (derrabus)
+ * bug #42099 [VarDumper] Support for intersection types (derrabus)
+ * bug #42011 [Cache] Support decorated Dbal drivers in PdoAdapter (Jeroeny)
+ * bug #42068 Add a Special Case for Translating Choices in en_US_POSIX (chrisguitarguy)
+ * bug #42074 Fix ctype_digit deprecation (alexpott)
+ * bug #42084 [WebProfilerBundle] Fix the values of some CSS properties (javiereguiluz)
+ * bug #42079 [FrameworkBundle] Fixed file operations in Sodium vault seal (javiereguiluz)
+ * bug #42067 [Messenger] [Redis] Make `auth` option works (welcoMattic)
+ * bug #42054 [DoctrineBridge] fix setting default mapping type to attribute/annotation on php 8/7 respectively (nicolas-grekas)
+ * bug #42059 [Messenger] Fixed BC layer for RedeliveryStamp (Nyholm)
+ * bug #42049 [TwigBridge] do not render the same label id attribute twice (xabbuh)
+ * bug #42032 [HttpKernel] recover from failed deserializations (xabbuh)
+ * bug #42035 [Messenger] Fix use_notify default value for PostgreSqlConnection (tgalopin)
+ * bug #41990 [Lock] fix derivating semaphore from key (nicolas-grekas)
+ * bug #40529 [Translation] Missing translations from traits (insekticid)
+ * bug #41384 Fix SkippedTestSuite (jderusse)
+ * bug #41966 [Console] Revert "bug #41952 fix handling positional arguments" (chalasr, nicolas-grekas)
+ * bug #41905 [EventDispatcher] Correct the called event listener method case (JJsty1e)
+ * bug #41952 [Console] fix handling positional arguments (nicolas-grekas)
+ * bug #41887 [PhpUnitBridge] Fix deprecation handler with PHPUnit 10 (YaFou)
+
* 5.2.11 (2021-06-30)
* bug #41893 [Filesystem] Workaround cannot dumpFile into "protected" folders on Windows (arnegroskurth)
diff --git a/CHANGELOG-5.3.md b/CHANGELOG-5.3.md
index 2c38dab5ba2c1..76537968a1c3c 100644
--- a/CHANGELOG-5.3.md
+++ b/CHANGELOG-5.3.md
@@ -7,6 +7,14 @@ in 5.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/v5.3.0...v5.3.1
+* 5.3.6 (2021-07-29)
+
+ * bug #42307 [Mailer] Fixed decode exception when sendgrid response is 202 (rubanooo)
+ * bug #42296 [Dotenv][Yaml] Remove PHP 8.0 polyfill (derrabus)
+ * bug #42274 [VarDumper] `HtmlDumper::setDumpHeader()` accepts `null` (rrpadilla)
+ * bug #42289 [HttpFoundation] Fixed type mismatch (Toflar)
+ * bug #42259 [Security] fix Check if it has session before getSession() (mousezheng)
+
* 5.3.5 (2021-07-27)
* bug #42270 [WebProfilerBundle] [WebProfiler] "empty" filter bugfix. Filter with name "empty" is not … (luzrain)
diff --git a/src/Symfony/Component/Console/Input/InputOption.php b/src/Symfony/Component/Console/Input/InputOption.php
index cda8b4f789a4d..72b1b74de750c 100644
--- a/src/Symfony/Component/Console/Input/InputOption.php
+++ b/src/Symfony/Component/Console/Input/InputOption.php
@@ -53,9 +53,11 @@ class InputOption
private $description;
/**
- * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
- * @param int|null $mode The option mode: One of the VALUE_* constants
- * @param string|bool|int|float|array|null $default The default value (must be null for self::VALUE_NONE)
+ * @param string $name The option name
+ * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
+ * @param int|null $mode The option mode: One of the VALUE_* constants
+ * @param string $description A description text
+ * @param string|bool|int|float|array|null $default The default value (must be null for self::VALUE_NONE)
*
* @throws InvalidArgumentException If option mode is invalid or incompatible
*/
diff --git a/src/Symfony/Component/Dotenv/Dotenv.php b/src/Symfony/Component/Dotenv/Dotenv.php
index 6c30803b21690..ade7fa5978a0b 100644
--- a/src/Symfony/Component/Dotenv/Dotenv.php
+++ b/src/Symfony/Component/Dotenv/Dotenv.php
@@ -190,7 +190,7 @@ public function populate(array $values, bool $overrideExistingVars = false): voi
$loadedVars = array_flip(explode(',', $_SERVER['SYMFONY_DOTENV_VARS'] ?? $_ENV['SYMFONY_DOTENV_VARS'] ?? ''));
foreach ($values as $name => $value) {
- $notHttpName = !str_starts_with($name, 'HTTP_');
+ $notHttpName = 0 !== strpos($name, 'HTTP_');
// don't check existence with getenv() because of thread safety issues
if (!isset($loadedVars[$name]) && (!$overrideExistingVars && (isset($_ENV[$name]) || (isset($_SERVER[$name]) && $notHttpName)))) {
continue;
@@ -427,7 +427,7 @@ private function skipEmptyLines()
private function resolveCommands(string $value, array $loadedVars): string
{
- if (!str_contains($value, '$')) {
+ if (false === strpos($value, '$')) {
return $value;
}
@@ -463,7 +463,7 @@ private function resolveCommands(string $value, array $loadedVars): string
$env = [];
foreach ($this->values as $name => $value) {
- if (isset($loadedVars[$name]) || (!isset($_ENV[$name]) && !(isset($_SERVER[$name]) && !str_starts_with($name, 'HTTP_')))) {
+ if (isset($loadedVars[$name]) || (!isset($_ENV[$name]) && !(isset($_SERVER[$name]) && 0 !== strpos($name, 'HTTP_')))) {
$env[$name] = $value;
}
}
@@ -481,7 +481,7 @@ private function resolveCommands(string $value, array $loadedVars): string
private function resolveVariables(string $value, array $loadedVars): string
{
- if (!str_contains($value, '$')) {
+ if (false === strpos($value, '$')) {
return $value;
}
@@ -516,7 +516,7 @@ private function resolveVariables(string $value, array $loadedVars): string
$value = $this->values[$name];
} elseif (isset($_ENV[$name])) {
$value = $_ENV[$name];
- } elseif (isset($_SERVER[$name]) && !str_starts_with($name, 'HTTP_')) {
+ } elseif (isset($_SERVER[$name]) && 0 !== strpos($name, 'HTTP_')) {
$value = $_SERVER[$name];
} elseif (isset($this->values[$name])) {
$value = $this->values[$name];
diff --git a/src/Symfony/Component/Dotenv/composer.json b/src/Symfony/Component/Dotenv/composer.json
index 6e85c9fded157..de8ec159740f5 100644
--- a/src/Symfony/Component/Dotenv/composer.json
+++ b/src/Symfony/Component/Dotenv/composer.json
@@ -17,8 +17,7 @@
],
"require": {
"php": ">=7.2.5",
- "symfony/deprecation-contracts": "^2.1",
- "symfony/polyfill-php80": "^1.16"
+ "symfony/deprecation-contracts": "^2.1"
},
"require-dev": {
"symfony/process": "^4.4|^5.0"
diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php
index 3ebc4378b5f30..da2e89766a35f 100644
--- a/src/Symfony/Component/HttpFoundation/Response.php
+++ b/src/Symfony/Component/HttpFoundation/Response.php
@@ -324,7 +324,7 @@ public function prepare(Request $request)
}
// Check if we need to send extra expire info headers
- if ('1.0' == $this->getProtocolVersion() && str_contains($headers->get('Cache-Control'), 'no-cache')) {
+ if ('1.0' == $this->getProtocolVersion() && str_contains($headers->get('Cache-Control', ''), 'no-cache')) {
$headers->set('pragma', 'no-cache');
$headers->set('expires', -1);
}
diff --git a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php
index 090d6097864be..77a04fefdfc5d 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php
@@ -581,6 +581,12 @@ public function testPrepareSetsPragmaOnHttp10Only()
$this->assertEquals('no-cache', $response->headers->get('pragma'));
$this->assertEquals('-1', $response->headers->get('expires'));
+ $response = new Response('foo');
+ $response->headers->remove('cache-control');
+ $response->prepare($request);
+ $this->assertFalse($response->headers->has('pragma'));
+ $this->assertFalse($response->headers->has('expires'));
+
$request->server->set('SERVER_PROTOCOL', 'HTTP/1.1');
$response = new Response('foo');
$response->prepare($request);
diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php
index 00ee243724438..0d0332d21703f 100644
--- a/src/Symfony/Component/HttpKernel/Kernel.php
+++ b/src/Symfony/Component/HttpKernel/Kernel.php
@@ -75,11 +75,11 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
private static $freshCache = [];
- public const VERSION = '5.3.5';
- public const VERSION_ID = 50305;
+ public const VERSION = '5.3.6';
+ public const VERSION_ID = 50306;
public const MAJOR_VERSION = 5;
public const MINOR_VERSION = 3;
- public const RELEASE_VERSION = 5;
+ public const RELEASE_VERSION = 6;
public const EXTRA_VERSION = '';
public const END_OF_MAINTENANCE = '01/2022';
diff --git a/src/Symfony/Component/Mailer/Bridge/Sendgrid/Transport/SendgridApiTransport.php b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Transport/SendgridApiTransport.php
index 14d841ac18a25..0134a6ff5ef7f 100644
--- a/src/Symfony/Component/Mailer/Bridge/Sendgrid/Transport/SendgridApiTransport.php
+++ b/src/Symfony/Component/Mailer/Bridge/Sendgrid/Transport/SendgridApiTransport.php
@@ -54,15 +54,18 @@ protected function doSendApi(SentMessage $sentMessage, Email $email, Envelope $e
try {
$statusCode = $response->getStatusCode();
- $result = $response->toArray(false);
- } catch (DecodingExceptionInterface $e) {
- throw new HttpTransportException('Unable to send an email: '.$response->getContent(false).sprintf(' (code %d).', $statusCode), $response);
} catch (TransportExceptionInterface $e) {
throw new HttpTransportException('Could not reach the remote Sendgrid server.', $response, 0, $e);
}
if (202 !== $statusCode) {
- throw new HttpTransportException('Unable to send an email: '.implode('; ', array_column($result['errors'], 'message')).sprintf(' (code %d).', $statusCode), $response);
+ try {
+ $result = $response->toArray(false);
+
+ throw new HttpTransportException('Unable to send an email: '.implode('; ', array_column($result['errors'], 'message')).sprintf(' (code %d).', $statusCode), $response);
+ } catch (DecodingExceptionInterface $e) {
+ throw new HttpTransportException('Unable to send an email: '.$response->getContent(false).sprintf(' (code %d).', $statusCode), $response);
+ }
}
$sentMessage->setMessageId($response->getHeaders(false)['x-message-id'][0]);
diff --git a/src/Symfony/Component/Security/Core/Resources/translations/security.eu.xlf b/src/Symfony/Component/Security/Core/Resources/translations/security.eu.xlf
index d957ceee29904..cfcdd1b02c44d 100644
--- a/src/Symfony/Component/Security/Core/Resources/translations/security.eu.xlf
+++ b/src/Symfony/Component/Security/Core/Resources/translations/security.eu.xlf
@@ -70,6 +70,14 @@
Invalid or expired login link.
Sartzeko esteka baliogabea edo iraungia.
+
+ Too many failed login attempts, please try again in %minutes% minute.
+ Saioa hasteko huts gehiegi egin dira, saiatu berriro minutu %minutes% geroago.
+
+
+ Too many failed login attempts, please try again in %minutes% minutes.
+ Saioa hasteko huts gehiegi egin dira, saiatu berriro %minutes% minututan.
+