Skip to content

Commit

Permalink
Merge branch '5.4' into 6.3
Browse files Browse the repository at this point in the history
* 5.4:
  fix tests on AppVeyor
  Hungarian typo fix in validators translation
  [Validator] updated Latvian translation
  [Validator] Added missing Swedish translations
  [Mailer] [Notifier] #52264 Update Sendinblue / Brevo API host
  [Validator] Added missing Estonian translations #51939
  fix File constraint tests on 32bit PHP
  [Form] Skip merging params & files if there are no files in the first place
  [Translation] Ignore bridges in `.gitattributes` file
  Add missing Hungarian validator translations
  Added missing Bosnian translations #51929
  Added missing Serbian (sr_Latn) translations
  Added missing Serbian (sr_Cyrl) translations
  Hide generated files in GitHub diffs and statistics
  #51937 - Added missing Danish translations
  • Loading branch information
xabbuh committed Oct 25, 2023
2 parents 6637b78 + ebb8cd8 commit c1bf14f
Show file tree
Hide file tree
Showing 15 changed files with 231 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
/src/Symfony/Component/Messenger/Bridge export-ignore
/src/Symfony/Component/Notifier/Bridge export-ignore
/src/Symfony/Component/Runtime export-ignore
/src/Symfony/Component/Translation/Bridge export-ignore
/src/Symfony/Component/Intl/Resources/data/*/* linguist-generated=true
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use PHPUnit\Framework\TestCase;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\Form\Extension\Core\DataMapper\DataMapper;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Form;
use Symfony\Component\Form\FormBuilder;
use Symfony\Component\Form\FormError;
Expand Down Expand Up @@ -236,6 +237,24 @@ public function testMergeParamsAndFiles($method)
$this->assertSame($file, $form->get('field2')->getData());
}

public function testIntegerChildren()
{
$form = $this->createForm('root', 'POST', true);
$form->add('0', TextType::class);
$form->add('1', TextType::class);

$this->setRequestData('POST', [
'root' => [
'1' => 'bar',
],
]);

$this->requestHandler->handleRequest($form, $this->request);

$this->assertNull($form->get('0')->getData());
$this->assertSame('bar', $form->get('1')->getData());
}

/**
* @dataProvider methodExceptGetProvider
*/
Expand Down
17 changes: 9 additions & 8 deletions src/Symfony/Component/Form/Util/FormUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,21 @@ public static function isEmpty(mixed $data): bool
*/
public static function mergeParamsAndFiles(array $params, array $files): array
{
$result = [];
if (array_is_list($files)) {
foreach ($files as $value) {
$params[] = $value;
}

return $params;
}

foreach ($params as $key => $value) {
if (\is_array($value) && \is_array($files[$key] ?? null)) {
$value = self::mergeParamsAndFiles($value, $files[$key]);
$params[$key] = self::mergeParamsAndFiles($value, $files[$key]);
unset($files[$key]);
}
if (\is_int($key)) {
$result[] = $value;
} else {
$result[$key] = $value;
}
}

return array_merge($result, $files);
return array_replace($params, $files);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static function getTransportData()
{
yield [
new SendinblueApiTransport('ACCESS_KEY'),
'sendinblue+api://api.sendinblue.com',
'sendinblue+api://api.brevo.com',
];

yield [
Expand Down Expand Up @@ -89,7 +89,7 @@ public function testSendThrowsForErrorResponse()
{
$client = new MockHttpClient(function (string $method, string $url, array $options): ResponseInterface {
$this->assertSame('POST', $method);
$this->assertSame('https://api.sendinblue.com:8984/v3/smtp/email', $url);
$this->assertSame('https://api.brevo.com:8984/v3/smtp/email', $url);
$this->assertStringContainsString('Accept: */*', $options['headers'][2] ?? $options['request_headers'][1]);

return new MockResponse(json_encode(['message' => 'i\'m a teapot']), [
Expand Down Expand Up @@ -119,7 +119,7 @@ public function testSend()
{
$client = new MockHttpClient(function (string $method, string $url, array $options): ResponseInterface {
$this->assertSame('POST', $method);
$this->assertSame('https://api.sendinblue.com:8984/v3/smtp/email', $url);
$this->assertSame('https://api.brevo.com:8984/v3/smtp/email', $url);
$this->assertStringContainsString('Accept: */*', $options['headers'][2] ?? $options['request_headers'][1]);

return new MockResponse(json_encode(['messageId' => 'foobar']), [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,6 @@ private function stringifyAddress(Address $address): array

private function getEndpoint(): ?string
{
return ($this->host ?: 'api.sendinblue.com').($this->port ? ':'.$this->port : '');
return ($this->host ?: 'api.brevo.com').($this->port ? ':'.$this->port : '');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
final class SendinblueTransport extends AbstractTransport
{
protected const HOST = 'api.sendinblue.com';
protected const HOST = 'api.brevo.com';

private string $apiKey;
private string $sender;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,30 @@
<source>The value of the netmask should be between {{ min }} and {{ max }}.</source>
<target>Vrijednost NetMask bi trebala biti između {{min}} i {{max}}.</target>
</trans-unit>
<trans-unit id="104">
<source>The filename is too long. It should have {{ filename_max_length }} character or less.|The filename is too long. It should have {{ filename_max_length }} characters or less.</source>
<target>Ime datoteke je predugačko. Trebao bi imati {{ filename_max_length }} znak ili manje.|Naziv fajla je predugačak. Trebao bi imati {{ filename_max_length }} znakova ili manje.</target>
</trans-unit>
<trans-unit id="105">
<source>The password strength is too low. Please use a stronger password.</source>
<target>Jačina lozinke je preniska. Molimo koristite jaču lozinku.</target>
</trans-unit>
<trans-unit id="106">
<source>This value contains characters that are not allowed by the current restriction-level.</source>
<target>Ova vrijednost sadrži znakove koji nisu dozvoljeni trenutnim nivoom ograničenja.</target>
</trans-unit>
<trans-unit id="107">
<source>Using invisible characters is not allowed.</source>
<target>Upotreba nevidljivih znakova nije dozvoljena.</target>
</trans-unit>
<trans-unit id="108">
<source>Mixing numbers from different scripts is not allowed.</source>
<target>Nije dozvoljeno miješanje brojeva iz različitih pisama.</target>
</trans-unit>
<trans-unit id="109">
<source>Using hidden overlay characters is not allowed.</source>
<target>Upotreba skrivenih preklapajućih znakova nije dozvoljena.</target>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,30 @@
<source>The value of the netmask should be between {{ min }} and {{ max }}.</source>
<target>Værdien af netmasken skal være mellem {{ min }} og {{ max }}.</target>
</trans-unit>
<trans-unit id="104">
<source>The filename is too long. It should have {{ filename_max_length }} character or less.|The filename is too long. It should have {{ filename_max_length }} characters or less.</source>
<target>Filnavnet er for langt. Det bør indeholde {{ filename_max_length }} tegn eller mindre.|Filnavnet er for langt. Det bør indeholde {{ filename_max_length }} tegn eller mindre.</target>
</trans-unit>
<trans-unit id="105">
<source>The password strength is too low. Please use a stronger password.</source>
<target>Kodeordets styrke er for lav. Du bedes indtaste et stærkere kodeord.</target>
</trans-unit>
<trans-unit id="106">
<source>This value contains characters that are not allowed by the current restriction-level.</source>
<target>Denne værdi indeholder tegn, som ikke er tilladt med det nuværende restriktionsniveau.</target>
</trans-unit>
<trans-unit id="107">
<source>Using invisible characters is not allowed.</source>
<target>Brug af usynlige tegn er ikke tilladt.</target>
</trans-unit>
<trans-unit id="108">
<source>Mixing numbers from different scripts is not allowed.</source>
<target>At blande numre fra forskellige scripts er ikke tilladt.</target>
</trans-unit>
<trans-unit id="109">
<source>Using hidden overlay characters is not allowed.</source>
<target>At bruge skjulte overlejringstegn er ikke tilladt.</target>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,30 @@
<source>The value of the netmask should be between {{ min }} and {{ max }}.</source>
<target>Võrgumaski väärtus peaks olema vahemikus {{ min }} kuni {{ max }}.</target>
</trans-unit>
<trans-unit id="104">
<source>The filename is too long. It should have {{ filename_max_length }} character or less.|The filename is too long. It should have {{ filename_max_length }} characters or less.</source>
<target>Failinimi on liiga pikk. See peaks olema {{ filename_max_length }} tähemärk või vähem.|Failinimi on liiga pikk. See peaks olema {{ filename_max_length }} tähemärki või vähem.</target>
</trans-unit>
<trans-unit id="105">
<source>The password strength is too low. Please use a stronger password.</source>
<target>Parooli tugevus on liiga madal. Palun kasuta tugevamat parooli.</target>
</trans-unit>
<trans-unit id="106">
<source>This value contains characters that are not allowed by the current restriction-level.</source>
<target>See väärtus sisaldab tähemärke, mida praegune piirangu tase ei luba.</target>
</trans-unit>
<trans-unit id="107">
<source>Using invisible characters is not allowed.</source>
<target>Mittenähtavate tähemärkide kasutamine ei ole lubatud.</target>
</trans-unit>
<trans-unit id="108">
<source>Mixing numbers from different scripts is not allowed.</source>
<target>Eri kirjasüsteemidest pärit numbrite koos kasutamine pole lubatud.</target>
</trans-unit>
<trans-unit id="109">
<source>Using hidden overlay characters is not allowed.</source>
<target>Peidetud tähemärkide kasutamine pole lubatud.</target>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,30 @@
<source>The value of the netmask should be between {{ min }} and {{ max }}.</source>
<target>Ennek a netmask értéknek {{ min }} és {{ max }} között kell lennie.</target>
</trans-unit>
<trans-unit id="104">
<source>The filename is too long. It should have {{ filename_max_length }} character or less.|The filename is too long. It should have {{ filename_max_length }} characters or less.</source>
<target>A fájlnév túl hosszú. {{ filename_max_length }} karakter vagy kevesebb legyen.|A fájlnév túl hosszú. {{ filename_max_length }} karakter vagy kevesebb legyen.</target>
</trans-unit>
<trans-unit id="105">
<source>The password strength is too low. Please use a stronger password.</source>
<target>A jelszó túl egyszerű. Kérjük, használjon egy bonyolultabb jelszót.</target>
</trans-unit>
<trans-unit id="106">
<source>This value contains characters that are not allowed by the current restriction-level.</source>
<target>Ez az érték olyan karaktereket tartalmaz, amik nem megengedettek.</target>
</trans-unit>
<trans-unit id="107">
<source>Using invisible characters is not allowed.</source>
<target>Láthatatlan karaktert használata nem megengedett.</target>
</trans-unit>
<trans-unit id="108">
<source>Mixing numbers from different scripts is not allowed.</source>
<target>Különböző szám írásmódok használata nem megengedett.</target>
</trans-unit>
<trans-unit id="109">
<source>Using hidden overlay characters is not allowed.</source>
<target>Rejtett módosító karakterek használata nem megengedett.</target>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,30 @@
<source>The value of the netmask should be between {{ min }} and {{ max }}.</source>
<target>Tīkla maskas (netmask) vērtībai jābūt starp {{ min }} un {{ max }}.</target>
</trans-unit>
<trans-unit id="104">
<source>The filename is too long. It should have {{ filename_max_length }} character or less.|The filename is too long. It should have {{ filename_max_length }} characters or less.</source>
<target>Faila nosaukums ir pārāk garš. Tas var būt {{ filename_max_length }} rakstzīme vai īsāks.|Faila nosaukums ir pārāk garš. Tas var būt {{ filename_max_length }} rakstzīmes vai īsāks.</target>
</trans-unit>
<trans-unit id="105">
<source>The password strength is too low. Please use a stronger password.</source>
<target>Paroles stiprums ir pārāk zems. Lūdzu, izmantojiet spēcīgāku paroli.</target>
</trans-unit>
<trans-unit id="106">
<source>This value contains characters that are not allowed by the current restriction-level.</source>
<target>Šī vērtība satur rakstzīmes, kuras nav atļautas pašreizējā ierobežojuma līmenī.</target>
</trans-unit>
<trans-unit id="107">
<source>Using invisible characters is not allowed.</source>
<target>Neredzamu rakstzīmju izmantošana nav atļauta.</target>
</trans-unit>
<trans-unit id="108">
<source>Mixing numbers from different scripts is not allowed.</source>
<target>Nav atļauts sajaukt numurus no dažādiem skriptiem.</target>
</trans-unit>
<trans-unit id="109">
<source>Using hidden overlay characters is not allowed.</source>
<target>Slēptu pārklājuma rakstzīmju izmantošana nav atļauta.</target>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,30 @@
<source>The value of the netmask should be between {{ min }} and {{ max }}.</source>
<target>Вредност мрежне маске треба бити између {{ min }} и {{ max }}.</target>
</trans-unit>
<trans-unit id="104">
<source>The filename is too long. It should have {{ filename_max_length }} character or less.|The filename is too long. It should have {{ filename_max_length }} characters or less.</source>
<target>Назив датотеке је сувише дугачак. Треба да има {{ filename_max_length }} карактер или мање.|Назив датотеке је сувише дугачак. Треба да има {{ filename_max_length }} карактера или мање.</target>
</trans-unit>
<trans-unit id="105">
<source>The password strength is too low. Please use a stronger password.</source>
<target>Лозинка није довољно јака. Молимо користите јачу лозинку.</target>
</trans-unit>
<trans-unit id="106">
<source>This value contains characters that are not allowed by the current restriction-level.</source>
<target>Ова вредност садржи карактере који нису дозвољени од стране важећег нивоа рестрикције.</target>
</trans-unit>
<trans-unit id="107">
<source>Using invisible characters is not allowed.</source>
<target>Коришћење невидљивих карактера није дозвољено.</target>
</trans-unit>
<trans-unit id="108">
<source>Mixing numbers from different scripts is not allowed.</source>
<target>Мешање бројева из различитих скрипти није дозвољено.</target>
</trans-unit>
<trans-unit id="109">
<source>Using hidden overlay characters is not allowed.</source>
<target>Коришћење скривених преклопних карактера није дозвољено.</target>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,30 @@
<source>The value of the netmask should be between {{ min }} and {{ max }}.</source>
<target>Vrednost mrežne maske treba biti između {{ min }} i {{ max }}.</target>
</trans-unit>
<trans-unit id="104">
<source>The filename is too long. It should have {{ filename_max_length }} character or less.|The filename is too long. It should have {{ filename_max_length }} characters or less.</source>
<target>Naziv datoteke je suviše dugačak. Treba da ima {{ filename_max_length }} karakter ili manje.|Naziv datoteke je suviše dugačak. Treba da ima {{ filename_max_length }} karaktera ili manje.</target>
</trans-unit>
<trans-unit id="105">
<source>The password strength is too low. Please use a stronger password.</source>
<target>Lozinka nije dovoljno jaka. Molimo koristite jaču lozinku.</target>
</trans-unit>
<trans-unit id="106">
<source>This value contains characters that are not allowed by the current restriction-level.</source>
<target>Ova vrednost sadrži karaktere koji nisu dozvoljeni od strane važećeg nivoa restrikcije.</target>
</trans-unit>
<trans-unit id="107">
<source>Using invisible characters is not allowed.</source>
<target>Korišćenje nevidljivih karaktera nije dozvoljeno.</target>
</trans-unit>
<trans-unit id="108">
<source>Mixing numbers from different scripts is not allowed.</source>
<target>Mešanje brojeva iz različitih skripti nije dozvoljeno.</target>
</trans-unit>
<trans-unit id="109">
<source>Using hidden overlay characters is not allowed.</source>
<target>Korišćenje skrivenih preklopnih karaktera nije dozvoljeno.</target>
</trans-unit>
</body>
</file>
</xliff>

0 comments on commit c1bf14f

Please sign in to comment.