Skip to content

Commit 4bd613d

Browse files
Merge branch '5.4' into 6.4
* 5.4: [HttpClient][Mailer] Revert "Let curl handle transfer encoding", use HTTP/1.1 for Mailgun Reviewed Catalan missing translations Fix typo: synchronous -> synchronously [Serializer] Check if exception message in test is correct Ibexa is sponsoring Symfony 5.4, thanks to them! \o/ [String] Add `alias` case to `EnglishInflector`
2 parents 7bdfccf + 1b18a07 commit 4bd613d

File tree

10 files changed

+16
-9
lines changed

10 files changed

+16
-9
lines changed

src/Symfony/Component/HttpClient/CurlHttpClient.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,9 @@ public function request(string $method, string $url, array $options = []): Respo
250250

251251
if (isset($options['normalized_headers']['content-length'][0])) {
252252
$curlopts[\CURLOPT_INFILESIZE] = (int) substr($options['normalized_headers']['content-length'][0], \strlen('Content-Length: '));
253-
} elseif (!isset($options['normalized_headers']['transfer-encoding'])) {
254-
$curlopts[\CURLOPT_INFILESIZE] = -1;
253+
}
254+
if (!isset($options['normalized_headers']['transfer-encoding'])) {
255+
$curlopts[\CURLOPT_HTTPHEADER][] = 'Transfer-Encoding:'.(isset($curlopts[\CURLOPT_INFILESIZE]) ? '' : ' chunked');
255256
}
256257

257258
if ('POST' !== $method) {

src/Symfony/Component/Mailer/Bridge/Mailgun/Transport/MailgunHttpTransport.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ protected function doSendHttp(SentMessage $message): ResponseInterface
6363

6464
$endpoint = sprintf('%s/v3/%s/messages.mime', $this->getEndpoint(), urlencode($this->domain));
6565
$response = $this->client->request('POST', 'https://'.$endpoint, [
66+
'http_version' => '1.1',
6667
'auth_basic' => 'api:'.$this->key,
6768
'headers' => $headers,
6869
'body' => $body->bodyToIterable(),

src/Symfony/Component/Mailer/MailerInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Symfony\Component\Mime\RawMessage;
1616

1717
/**
18-
* Interface for mailers able to send emails synchronous and/or asynchronous.
18+
* Interface for mailers able to send emails synchronously and/or asynchronously.
1919
*
2020
* Implementations must support synchronous and asynchronous sending.
2121
*

src/Symfony/Component/Notifier/ChatterInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Symfony\Component\Notifier\Transport\TransportInterface;
1515

1616
/**
17-
* Interface for classes able to send chat messages synchronous and/or asynchronous.
17+
* Interface for classes able to send chat messages synchronously and/or asynchronously.
1818
*
1919
* @author Fabien Potencier <[email protected]>
2020
*/

src/Symfony/Component/Notifier/TexterInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Symfony\Component\Notifier\Transport\TransportInterface;
1515

1616
/**
17-
* Interface for classes able to send SMS messages synchronous and/or asynchronous.
17+
* Interface for classes able to send SMS messages synchronously and/or asynchronously.
1818
*
1919
* @author Fabien Potencier <[email protected]>
2020
*/

src/Symfony/Component/Security/Core/Resources/translations/security.ca.xlf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,19 @@
6464
</trans-unit>
6565
<trans-unit id="17">
6666
<source>Too many failed login attempts, please try again later.</source>
67-
<target>Massa intents d'inici de sessió fallits, torneu-ho a provar més tard.</target>
67+
<target>Massa intents d'inici de sessió fallits, si us plau torneu-ho a provar més tard.</target>
6868
</trans-unit>
6969
<trans-unit id="18">
7070
<source>Invalid or expired login link.</source>
7171
<target>Enllaç d'inici de sessió no vàlid o caducat.</target>
7272
</trans-unit>
7373
<trans-unit id="19">
7474
<source>Too many failed login attempts, please try again in %minutes% minute.</source>
75-
<target>Massa intents d'inici de sessió fallits, torneu-ho a provar en %minutes% minut.</target>
75+
<target>Massa intents d'inici de sessió fallits, si us plau torneu-ho a provar en %minutes% minut.</target>
7676
</trans-unit>
7777
<trans-unit id="20">
7878
<source>Too many failed login attempts, please try again in %minutes% minutes.</source>
79-
<target state="needs-review-translation">Massa intents fallits d'inici de sessió, torneu-ho a provar d'aquí a %minutes% minuts.</target>
79+
<target>Massa intents d'inici de sessió fallits, si us plau torneu-ho a provar en %minutes% minuts.</target>
8080
</trans-unit>
8181
</body>
8282
</file>

src/Symfony/Component/Serializer/Tests/Fixtures/NotNormalizableDummy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ public function __construct()
2626

2727
public function denormalize(DenormalizerInterface $denormalizer, $data, ?string $format = null, array $context = []): void
2828
{
29-
throw new NotNormalizableValueException();
29+
throw new NotNormalizableValueException('Custom exception message');
3030
}
3131
}

src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,7 @@ public function testDenormalizeUntypedFormat()
888888
public function testDenormalizeUntypedFormatNotNormalizable()
889889
{
890890
$this->expectException(NotNormalizableValueException::class);
891+
$this->expectExceptionMessage('Custom exception message');
891892
$serializer = new Serializer([new CustomNormalizer(), new ObjectNormalizer(null, null, null, new PropertyInfoExtractor([], [new PhpDocExtractor(), new ReflectionExtractor()]))]);
892893
$serializer->denormalize(['value' => 'test'], DummyWithNotNormalizable::class, 'xml');
893894
}

src/Symfony/Component/String/Inflector/EnglishInflector.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,9 @@ final class EnglishInflector implements InflectorInterface
289289
// atlases (atlas)
290290
['salta', 5, true, true, 'atlases'],
291291

292+
// aliases (alias)
293+
['saila', 5, true, true, 'aliases'],
294+
292295
// irises (iris)
293296
['siri', 4, true, true, 'irises'],
294297

src/Symfony/Component/String/Tests/Inflector/EnglishInflectorTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ public static function pluralizeProvider()
317317
['hippocampus', 'hippocampi'],
318318
['campus', 'campuses'],
319319
['hardware', 'hardware'],
320+
['alias', 'aliases'],
320321

321322
// test casing: if the first letter was uppercase, it should remain so
322323
['Man', 'Men'],

0 commit comments

Comments
 (0)