10000 Merge branch '3.4' into 4.2 · symfony/symfony@1614a52 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1614a52

Browse files
committed
Merge branch '3.4' into 4.2
* 3.4: (25 commits) Add missing ID_id validators translation fixed CS Added missing translations in validators.tr.xlf Update validators.es.xlf Update validators.hu.xlf [Validator] Add the missing translations for the Welsh (cy) locale [Validator] Add missing DE validator translations [Validator] Add the missing translations for the Dutch (nl) locale Add missing PL translation Add missing translations. Add missing translations for IT to Validator minor #30184 [Validator] Add the missing translations for the Russian (ru) locale (antonch1989) [Validator] Add the missing translations for the Arabic (ar) locale add_missing_translations_for_portuguese : [Validator] Add the missing translations for the Portuguese ("pt") locale [Validator] Add the missing translations for the French (fr) locale [Validator] Add some missing contents to the English translation use PropertyAccessorInterface instead of PropertyAccessor Fix KernelTestCase compatibility for PhpUnit 8 (bis) add xabbuh as code owner of the Form component [Validator] Added a missing translation ...
2 parents 37f6be1 + a9353c2 commit 1614a52

25 files changed

+451
-11
lines changed

.github/CODEOWNERS

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22
/src/Symfony/Component/Console/Logger/ConsoleLogger.php @dunglas
33
# DependencyInjection
44
/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php @dunglas
5+
# Form
6+
/src/Symfony/Bridge/Twig/Extension/FormExtension.php @xabbuh
7+
/src/Symfony/Bridge/Twig/Form/* @xabbuh
8+
/src/Symfony/Bridge/Twig/Node/FormThemeNode.php @xabbuh
9+
/src/Symfony/Bridge/Twig/Node/RenderBlockNode.php @xabbuh
10+
/src/Symfony/Bridge/Twig/Node/SearchAndRenderBlockNode.php @xabbuh
11+
/src/Symfony/Bridge/Twig/Tests/Extension/FormExtension* @xabbuh
12+
/src/Symfony/Bridge/Twig/Tests/Node/FormThemeTest.php @xabbuh
13+
/src/Symfony/Bridge/Twig/Tests/TokenParser/FormThemeTokenParserTest.php @xabbuh
14+
/src/Symfony/Bridge/Twig/TokenParser/FormThemeTokenParser.php @xabbuh
15+
/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/FormPass.php @xabbuh
16+
/src/Symfony/Bundle/FrameworkBundle/Resources/views/* @xabbuh
17+
/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php @xabbuh
18+
/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/FormPassTest.php @xabbuh
19+
/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php @xabbuh
20+
/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php @xabbuh
21+
/src/Symfony/Component/Form/* @xabbuh
522
# HttpKernel
623
/src/Symfony/Component/HttpKernel/Log/Logger.php @dunglas
724
# LDAP

src/Symfony/Bridge/PhpUnit/composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
"php": ">=5.3.3"
2222
},
2323
"suggest": {
24-
"symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader",
25-
"ext-zip": "Zip support is required when using bin/simple-phpunit"
24+
"symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader"
2625
},
2726
"conflict": {
2827
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0"
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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\Bundle\FrameworkBundle\Test;
13+
14+
use PHPUnit\Framework\TestCase;
15+
16+
// Auto-adapt to PHPUnit 8 that added a `void` return-type to the tearDown method
17+
18+
if (method_exists(\ReflectionMethod::class, 'hasReturnType') && (new \ReflectionMethod(TestCase::class, 'tearDown'))->hasReturnType()) {
19+
eval('
20+
/**
21+
* @internal
22+
*/
23+
trait KernelShutdownOnTearDownTrait
24+
{
25+
protected function tearDown(): void
26+
{
27+
static::ensureKernelShutdown();
28+
}
29+
}
30+
');
31+
} else {
32+
/**
33+
* @internal
34+
*/
35+
trait KernelShutdownOnTearDownTrait
36+
{
37+
/**
38+
* @return void
39+
*/
40+
protected function tearDown()
41+
{
42+
static::ensureKernelShutdown();
43+
}
44+
}
45+
}

src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
*/
2424
abstract class KernelTestCase extends TestCase
2525
{
26+
use KernelShutdownOnTearDownTrait;
27+
2628
protected static $class;
2729

2830
/**
@@ -112,9 +114,7 @@ protected static function createKernel(array $options = [])
112114
}
113115

114116
/**
115-
* @after
116-
*
117-
* Shuts the kernel down if it was used in the test.
117+
* Shuts the kernel down if it was used in the test - called by the tearDown method by default.
118118
*/
119119
protected static function ensureKernelShutdown()
120120
{

src/Symfony/Component/Form/Extension/Validator/ViolationMapper/MappingRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function getOrigin()
5050
*/
5151
public function match($propertyPath)
5252
{
53-
if ($propertyPath === (string) $this->propertyPath) {
53+
if ($propertyPath === $this->propertyPath) {
5454
return $this->getTarget();
5555
}
5656
}

src/Symfony/Component/Form/FormTypeGuesserInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function guessType($class, $property);
3232
* @param string $class The fully qualified class name
3333
* @param string $property The name of the property to guess for
3434
*
35-
* @return Guess\ValueGuess A guess for the field's required setting
35+
* @return Guess\ValueGuess|null A guess for the field's required setting
3636
*/
3737
public function guessRequired($class, $property);
3838

src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,26 @@ public function testSubmitMultipleFiles($method)
285285
$this->assertSame($file, $form->getData());
286286
}
287287

288+
/**
289+
* @dataProvider methodExceptGetProvider
290+
*/
291+
public function testSubmitFileWithNamelessForm($method)
292+
{
293+
$form = $this->createForm('', $method, true);
294+
$fileForm = $this->createBuilder('document', false, ['allow_file_upload' => true])->getForm();
295+
$form->add($fileForm);
296+
$file = $this->getUploadedFile();
297+
$this->setRequestData($method, [
298+
'document' => null,
299+
], [
300+
'document' => $file,
301+
]);
302+
$this->requestHandler->handleRequest($form, $this->request);
303+
304+
$this->assertTrue($form->isSubmitted());
305+
$this->assertSame($file, $fileForm->getData());
306+
}
307+
288308
/**
289309
* @dataProvider getPostMaxSizeFixtures
290310
*/

src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ public function handle(GetResponseEvent $event)
8383
return;
8484
}
8585

86+
if (null === $this->tokenStorage->getToken()) {
87+
throw new AuthenticationCredentialsNotFoundException('Could not find original Token object.');
88+
}
89+
8690
if (self::EXIT_VALUE === $username) {
8791
$this->tokenStorage->setToken($this->attemptExitUser($request));
8892
} else {
@@ -165,7 +169,7 @@ private function attemptSwitchUser(Request $request, $username)
165169
*/
166170
private function attemptExitUser(Request $request)
167171
{
168-
if (null === ($currentToken = $this->tokenStorage->getToken()) || false === $original = $this->getOriginalToken($currentToken)) {
172+
if (false === $original = $this->getOriginalToken($this->tokenStorage->getToken())) {
169173
throw new AuthenticationCredentialsNotFoundException('Could not find original Token object.');
170174
}
171175

src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,17 @@ public function testSwitchUserWithReplacedToken()
267267
$this->assertSame($replacedToken, $this->tokenStorage->getToken());
268268
}
269269

270+
/**
271+
* @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException
272+
*/
273+
public function testSwitchtUserThrowsAuthenticationExceptionIfNoCurrentToken()
274+
{
275+
$this->tokenStorage->setToken(null);
276+
$this->request->query->set('_switch_user', 'username');
277+
$listener = new SwitchUserListener($this->tokenStorage, $this->userProvider, $this->userChecker, 'provider123', $this->accessDecisionManager);
278+
$listener->handle($this->event);
279+
}
280+
270281
public function testSwitchUserStateless()
271282
{
272283
$token = new UsernamePasswordToken('username', '', 'key', ['ROLE_FOO']);

src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException;
1515
use Symfony\Component\PropertyAccess\PropertyAccess;
16-
use Symfony\Component\PropertyAccess\PropertyAccessor;
16+
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
1717
use Symfony\Component\Validator\Constraint;
1818
use Symfony\Component\Validator\ConstraintValidator;
1919
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
@@ -29,7 +29,7 @@ abstract class AbstractComparisonValidator extends ConstraintValidator
2929
{
3030
private $propertyAccessor;
3131

32-
public function __construct(PropertyAccessor $propertyAccessor = null)
32+
public function __construct(PropertyAccessorInterface $propertyAccessor = null)
3333
{
3434
$this->propertyAccessor = $propertyAccessor;
3535
}

src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,26 @@
310310
<source>This value does not match the expected {{ charset }} charset.</source>
311311
<target>هذه القيمة غير متطابقة مع صيغة التحويل {{ charset }}.</target>
312312
</trans-unit>
313+
<trans-unit id="81">
314+
<source>This is not a valid Business Identifier Code (BIC).</source>
315+
<target>هذه القيمة ليست رمز معرّف نشاط تجاري صالح (BIC).</target>
316+
</trans-unit>
317+
<trans-unit id="82">
318+
<source>Error</source>
319+
<target>خطأ</target>
320+
</trans-unit>
321+
<trans-unit id="83">
322+
<source>This is not a valid UUID.</source>
323+
<target>هذا ليس UUID صالح.</target>
324+
</trans-unit>
325+
<trans-unit id="84">
326+
<source>This value should be a multiple of {{ compared_value }}.</source>
327+
<target>هذه القيمة يجب أن تكون مضاعف ل {{ compared_value }}.</target>
328+
</trans-unit>
329+
<trans-unit id="85">
330+
<source>This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.</source>
331+
<target>رمز المعرّف نشاط تجاري (BIC) هذا لا يرتبط مع IBAN {{ iban }}.</target>
332+
</trans-unit>
313333
</body>
314334
</file>
315335
</xliff>

src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,114 @@
222222
<source>Unsupported card type or invalid card number.</source>
223223
<target>Unai ni dderbynir y math yna o gerdyn, neu nid yw rhif y cerdyn yn ddilys.</target>
224224
</trans-unit>
225+
<trans-unit id="59">
226+
<source>This is not a valid International Bank Account Number (IBAN).</source>
227+
<target>Nid yw hwn yn Rhif Cyfrif Banc Rhyngwladol (IBAN) dilys.</target>
228+
</trans-unit>
229+
<trans-unit id="60">
230+
<source>This value is not a valid ISBN-10.</source>
231+
<target>Nid yw'r gwerth hwn yn ISBN-10 dilys.</target>
232+
</trans-unit>
233+
<trans-unit id="61">
234+
<source>This value is not a valid ISBN-13.</source>
235+
<target>Nid yw'r gwerth hwn yn ISBN-13 dilys.</target>
236+
</trans-unit>
237+
<trans-unit id="62">
238+
<source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source>
239+
<target>Nid yw'r gwerth hwn yn Rhif ISBN-10 dilys nac yn ISBN-13 dilys.</target>
240+
</trans-unit>
241+
<trans-unit id="63">
242+
<source>This value is not a valid ISSN.</source>
243+
<target>Nid yw'r gwerth hwn yn ISSN dilys.</target>
244+
</trans-unit>
245+
<trans-unit id="64">
246+
<source>This value is not a valid currency.</source>
247+
<target>Nid yw'r gwerth hwn yn arian dilys.</target>
248+
</trans-unit>
249+
<trans-unit id="65">
250+
<source>This value should be equal to {{ compared_value }}.</source>
251+
<target>Dylai'r gwerth hwn fod yn gyfartal â {{ compared_value }}.</target>
252+
</trans-unit>
253+
<trans-unit id="66">
254+
<source>This value should be greater than {{ compared_value }}.</source>
255+
<target>Dylai'r gwerth hwn fod yn fwy na {{ compared_value }}.</target>
256+
</trans-unit>
257+
<trans-unit id="67">
258+
<source>This value should be greater than or equal to {{ compared_value }}.</source>
259+
<target>Dylai'r gwerth hwn fod yn fwy na neu'n hafal i {{ compared_value }}.</target>
260+
</trans-unit>
261+
<trans-unit id="68">
262+
<source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source>
263+
<target>Dylai'r gwerth hwn fod yn union yr un fath â {{ compared_value_type }} {{ compared_value }}.</target>
264+
</trans-unit>
265+
<trans-unit id="69">
266+
<source>This value should be less than {{ compared_value }}.</source>
267+
<target>Dylai'r gwerth hwn fod yn llai na {{ compared_value }}.</target>
268+
</trans-unit>
269+
<trans-unit id="70">
270+
<source>This value should be less than or equal to {{ compared_value }}.</source>
271+
<target>Dylai'r gwerth hwn fod yn llai na neu'n hafal i {{ compared_value }}.</target>
272+
</trans-unit>
273+
<trans-unit id="71">
274+
<source>This value should not be equal to {{ compared_value }}.</source>
275+
<target>Ni ddylai'r gwerth hwn fod yn hafal i {{ compared_value }}.</target>
276+
</trans-unit>
277+
<trans-unit id="72">
278+
<source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source>
279+
<target>Ni ddylai'r gwerth hwn fod yn union yr un fath â {{ compared_value_type }} {{ compared_value }}.</target>
280+
</trans-unit>
281+
<trans-unit id="73">
282+
<source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source>
283+
<target>Mae'r gymhareb delwedd yn rhy fawr ({{ ratio }}). Y gymhareb uchaf a ganiateir yw {{ max_ratio }}.</target>
284+
</trans-unit>
285+
<trans-unit id="74">
286+
<source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source>
287+
<target>Mae'r gymhareb delwedd yn rhy fach ({{ ratio }}). Y gymhareb isaf a ddisgwylir yw {{ min_ratio }}.</target>
288+
</trans-unit>
289+
<trans-unit id="75">
290+
<source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source>
291+
<target>Mae'r ddelwedd yn sgwâr ({{ width }}x{{ height }}px). Ni chaniateir delweddau sgwâr.</target>
292+
</trans-unit>
293+
<trans-unit id="76">
294+
<source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source>
295+
<target>Mae'r ddelwedd mewn fformat tirlun ({{ width }}x{{ height }}px). Ni chaniateir delweddau mewn fformat tirlun.</target>
296+
</trans-unit>
297+
<trans-unit id="77">
298+
<source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source>
299+
<target>Mae'r ddelwedd mewn fformat portread ({{ width }}x{{ height }}px). Ni chaniateir delweddau mewn fformat portread.</target>
300+
</trans-unit>
301+
<trans-unit id="78">
302+
<source>An empty file is not allowed.</source>
303+
<target>Ni chaniateir ffeil wag.</target>
304+
</trans-unit>
305+
<trans-unit id="79">
306+
<source>The host could not be resolved.</source>
307+
<target>Ni fu modd datrys y gwesteiwr.</target>
308+
</trans-unit>
309+
<trans-unit id="80">
310+
<source>This value does not match the expected {{ charset }} charset.</source>
311+
<target>Nid yw'r gwerth hwn yn cyfateb â'r {{ charset }} set nodau ddisgwyliedig.</target>
312+
</trans-unit>
313+
<trans-unit id="81">
314+
<source>This is not a valid Business Identifier Code (BIC).</source>
315+
<target>Nid yw hwn yn God Adnabod Busnes (BIC) dilys.</target>
316+
</trans-unit>
317+
<trans-unit id="82">
318+
<source>Error</source>
319+
<target>Gwall</target>
320+
</trans-unit>
321+
<trans-unit id="83">
322+
<source>This is not a valid UUID.</source>
323+
<target>Nid yw hyn yn UUID dilys.</target>
324+
</trans-unit>
325+
<trans-unit id="84">
326+
<source>This value should be a multiple of {{ compared_value }}.</source>
327+
<target>Dylai'r gwerth hwn fod yn luosrif o {{ compared_value }}.</target>
328+
</trans-unit>
329+
<trans-unit id="85">
330+
<source>This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.</source>
331+
<target>Nid yw'r Cod Adnabod Busnes (BIC) hwn yn gysylltiedig ag IBAN {{ iban }}.</target>
332+
</trans-unit>
225333
</body>
226334
</file>
227335
</xliff>

src/Symfony/Component/Validator/Resources/translations/validators.de.xlf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,10 @@
326326
<source>This value should be a multiple of {{ compared_value }}.</source>
327327
<target>Dieser Wert sollte ein Vielfaches von {{ compared_value }} sein.</target>
328328
</trans-unit>
329+
<trans-unit id="85">
330+
<source>This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.</source>
331+
<target>Diese internationale Bankleitzahl (BIC) ist nicht mit der IBAN {{ iban }} assoziiert.</target>
332+
</trans-unit>
329333
</body>
330334
</file>
331335
</xliff>

src/Symfony/Component/Validator/Resources/translations/validators.en.xlf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,10 @@
326326
<source>This value should be a multiple of {{ compared_value }}.</source>
327327
<target>This value should be a multiple of {{ compared_value }}.</target>
328328
</trans-unit>
329+
<trans-unit id="85">
330+
<source>This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.</source>
331+
<target>This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.</target>
332+
</trans-unit>
329333
</body>
330334
</file>
331335
</xliff>

src/Symfony/Component/Validator/Resources/translations/validators.es.xlf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,10 @@
326326
<source>This value should be a multiple of {{ compared_value }}.</source>
327327
<target>Este valor debería ser un múltiplo de {{ compared_value }}.</target>
328328
</trans-unit>
329+
<trans-unit id="85">
330+
<source>This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.</source>
331+
<target>Este Código de Identificación Bancaria (BIC) no está asociado con el IBAN {{ iban }}.</target>
332+
</trans-unit>
329333
</body>
330334
</file>
331335
</xliff>

src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,10 @@
326326
<source>This value should be a multiple of {{ compared_value }}.</source>
327327
<target>Cette valeur doit être un multiple de {{ compared_value }}.</target>
328328
</trans-unit>
329+
<trans-unit id="85">
330+
<source>This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.</source>
331+
<target>Ce code d'identification d'entreprise (BIC) n'est pas associé à l'IBAN {{ iban }}.</target>
332+
</trans-unit>
329333
</body>
330334
</file>
331335
</xliff>

0 commit comments

Comments
 (0)
0