Skip to content
Permalink
Browse files

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
  ...
  • Loading branch information...
fabpot committed Feb 12, 2019
2 parents 37f6be1 + a9353c2 commit 1614a52b28a4279579c11f36e77fef6b36bdeb9a
Showing with 451 additions and 11 deletions.
  1. +17 −0 .github/CODEOWNERS
  2. +1 −2 src/Symfony/Bridge/PhpUnit/composer.json
  3. +45 −0 src/Symfony/Bundle/FrameworkBundle/Test/KernelShutdownOnTearDownTrait.php
  4. +3 −3 src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php
  5. +1 −1 src/Symfony/Component/Form/Extension/Validator/ViolationMapper/MappingRule.php
  6. +1 −1 src/Symfony/Component/Form/FormTypeGuesserInterface.php
  7. +20 −0 src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php
  8. +5 −1 src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php
  9. +11 −0 src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php
  10. +2 −2 src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php
  11. +20 −0 src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf
  12. +108 −0 src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf
  13. +4 −0 src/Symfony/Component/Validator/Resources/translations/validators.de.xlf
  14. +4 −0 src/Symfony/Component/Validator/Resources/translations/validators.en.xlf
  15. +4 −0 src/Symfony/Component/Validator/Resources/translations/validators.es.xlf
  16. +4 −0 src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf
  17. +16 −0 src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf
  18. +8 −0 src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf
  19. +12 −0 src/Symfony/Component/Validator/Resources/translations/validators.id.xlf
  20. +8 −0 src/Symfony/Component/Validator/Resources/translations/validators.it.xlf
  21. +9 −1 src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf
  22. +4 −0 src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf
  23. +24 −0 src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf
  24. +16 −0 src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf
  25. +104 −0 src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf
@@ -2,6 +2,23 @@
/src/Symfony/Component/Console/Logger/ConsoleLogger.php @dunglas
# DependencyInjection
/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php @dunglas
# Form
/src/Symfony/Bridge/Twig/Extension/FormExtension.php @xabbuh
/src/Symfony/Bridge/Twig/Form/* @xabbuh
/src/Symfony/Bridge/Twig/Node/FormThemeNode.php @xabbuh
/src/Symfony/Bridge/Twig/Node/RenderBlockNode.php @xabbuh
/src/Symfony/Bridge/Twig/Node/SearchAndRenderBlockNode.php @xabbuh
/src/Symfony/Bridge/Twig/Tests/Extension/FormExtension* @xabbuh
/src/Symfony/Bridge/Twig/Tests/Node/FormThemeTest.php @xabbuh
/src/Symfony/Bridge/Twig/Tests/TokenParser/FormThemeTokenParserTest.php @xabbuh
/src/Symfony/Bridge/Twig/TokenParser/FormThemeTokenParser.php @xabbuh
/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/FormPass.php @xabbuh
/src/Symfony/Bundle/FrameworkBundle/Resources/views/* @xabbuh
/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php @xabbuh
/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/FormPassTest.php @xabbuh
/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php @xabbuh
/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php @xabbuh
/src/Symfony/Component/Form/* @xabbuh
# HttpKernel
/src/Symfony/Component/HttpKernel/Log/Logger.php @dunglas
# LDAP
@@ -21,8 +21,7 @@
"php": ">=5.3.3"
},
"suggest": {
"symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader",
"ext-zip": "Zip support is required when using bin/simple-phpunit"
"symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader"
},
"conflict": {
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0"
@@ -0,0 +1,45 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bundle\FrameworkBundle\Test;
use PHPUnit\Framework\TestCase;
// Auto-adapt to PHPUnit 8 that added a `void` return-type to the tearDown method
if (method_exists(\ReflectionMethod::class, 'hasReturnType') && (new \ReflectionMethod(TestCase::class, 'tearDown'))->hasReturnType()) {
eval('
/**
* @internal
*/
trait KernelShutdownOnTearDownTrait
{
protected function tearDown(): void
{
static::ensureKernelShutdown();
}
}
');
} else {
/**
* @internal
*/
trait KernelShutdownOnTearDownTrait
{
/**
* @return void
*/
protected function tearDown()
{
static::ensureKernelShutdown();
}
}
}
@@ -23,6 +23,8 @@
*/
abstract class KernelTestCase extends TestCase
{
use KernelShutdownOnTearDownTrait;
protected static $class;
/**
@@ -112,9 +114,7 @@ protected static function createKernel(array $options = [])
}
/**
* @after
*
* Shuts the kernel down if it was used in the test.
* Shuts the kernel down if it was used in the test - called by the tearDown method by default.
*/
protected static function ensureKernelShutdown()
{
@@ -50,7 +50,7 @@ public function getOrigin()
*/
public function match($propertyPath)
{
if ($propertyPath === (string) $this->propertyPath) {
if ($propertyPath === $this->propertyPath) {
return $this->getTarget();
}
}
@@ -32,7 +32,7 @@ public function guessType($class, $property);
* @param string $class The fully qualified class name
* @param string $property The name of the property to guess for
*
* @return Guess\ValueGuess A guess for the field's required setting
* @return Guess\ValueGuess|null A guess for the field's required setting
*/
public function guessRequired($class, $property);
@@ -285,6 +285,26 @@ public function testSubmitMultipleFiles($method)
$this->assertSame($file, $form->getData());
}
/**
* @dataProvider methodExceptGetProvider
*/
public function testSubmitFileWithNamelessForm($method)
{
$form = $this->createForm('', $method, true);
$fileForm = $this->createBuilder('document', false, ['allow_file_upload' => true])->getForm();
$form->add($fileForm);
$file = $this->getUploadedFile();
$this->setRequestData($method, [
'document' => null,
], [
'document' => $file,
]);
$this->requestHandler->handleRequest($form, $this->request);
$this->assertTrue($form->isSubmitted());
$this->assertSame($file, $fileForm->getData());
}
/**
* @dataProvider getPostMaxSizeFixtures
*/
@@ -83,6 +83,10 @@ public function handle(GetResponseEvent $event)
return;
}
if (null === $this->tokenStorage->getToken()) {
throw new AuthenticationCredentialsNotFoundException('Could not find original Token object.');
}
if (self::EXIT_VALUE === $username) {
$this->tokenStorage->setToken($this->attemptExitUser($request));
} else {
@@ -165,7 +169,7 @@ private function attemptSwitchUser(Request $request, $username)
*/
private function attemptExitUser(Request $request)
{
if (null === ($currentToken = $this->tokenStorage->getToken()) || false === $original = $this->getOriginalToken($currentToken)) {
if (false === $original = $this->getOriginalToken($this->tokenStorage->getToken())) {
throw new AuthenticationCredentialsNotFoundException('Could not find original Token object.');
}
@@ -267,6 +267,17 @@ public function testSwitchUserWithReplacedToken()
$this->assertSame($replacedToken, $this->tokenStorage->getToken());
}
/**
* @expectedException \Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException
*/
public function testSwitchtUserThrowsAuthenticationExceptionIfNoCurrentToken()
{
$this->tokenStorage->setToken(null);
$this->request->query->set('_switch_user', 'username');
$listener = new SwitchUserListener($this->tokenStorage, $this->userProvider, $this->userChecker, 'provider123', $this->accessDecisionManager);
$listener->handle($this->event);
}
public function testSwitchUserStateless()
{
$token = new UsernamePasswordToken('username', '', 'key', ['ROLE_FOO']);
@@ -13,7 +13,7 @@
use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException;
use Symfony\Component\PropertyAccess\PropertyAccess;
use Symfony\Component\PropertyAccess\PropertyAccessor;
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
@@ -29,7 +29,7 @@ abstract class AbstractComparisonValidator extends ConstraintValidator
{
private $propertyAccessor;
public function __construct(PropertyAccessor $propertyAccessor = null)
public function __construct(PropertyAccessorInterface $propertyAccessor = null)
{
$this->propertyAccessor = $propertyAccessor;
}
@@ -310,6 +310,26 @@
<source>This value does not match the expected {{ charset }} charset.</source>
<target>هذه القيمة غير متطابقة مع صيغة التحويل {{ charset }}.</target>
</trans-unit>
<trans-unit id="81">
<source>This is not a valid Business Identifier Code (BIC).</source>
<target>هذه القيمة ليست رمز معرّف نشاط تجاري صالح (BIC).</target>
</trans-unit>
<trans-unit id="82">
<source>Error</source>
<target>خطأ</target>
</trans-unit>
<trans-unit id="83">
<source>This is not a valid UUID.</source>
<target>هذا ليس UUID صالح.</target>
</trans-unit>
<trans-unit id="84">
<source>This value should be a multiple of {{ compared_value }}.</source>
<target>هذه القيمة يجب أن تكون مضاعف ل {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="85">
<source>This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.</source>
<target>رمز المعرّف نشاط تجاري (BIC) هذا لا يرتبط مع IBAN {{ iban }}.</target>
</trans-unit>
</body>
</file>
</xliff>
@@ -222,6 +222,114 @@
<source>Unsupported card type or invalid card number.</source>
<target>Unai ni dderbynir y math yna o gerdyn, neu nid yw rhif y cerdyn yn ddilys.</target>
</trans-unit>
<trans-unit id="59">
<source>This is not a valid International Bank Account Number (IBAN).</source>
<target>Nid yw hwn yn Rhif Cyfrif Banc Rhyngwladol (IBAN) dilys.</target>
</trans-unit>
<trans-unit id="60">
<source>This value is not a valid ISBN-10.</source>
<target>Nid yw'r gwerth hwn yn ISBN-10 dilys.</target>
</trans-unit>
<trans-unit id="61">
<source>This value is not a valid ISBN-13.</source>
<target>Nid yw'r gwerth hwn yn ISBN-13 dilys.</target>
</trans-unit>
<trans-unit id="62">
<source>This value is neither a valid ISBN-10 nor a valid ISBN-13.</source>
<target>Nid yw'r gwerth hwn yn Rhif ISBN-10 dilys nac yn ISBN-13 dilys.</target>
</trans-unit>
<trans-unit id="63">
<source>This value is not a valid ISSN.</source>
<target>Nid yw'r gwerth hwn yn ISSN dilys.</target>
</trans-unit>
<trans-unit id="64">
<source>This value is not a valid currency.</source>
<target>Nid yw'r gwerth hwn yn arian dilys.</target>
</trans-unit>
<trans-unit id="65">
<source>This value should be equal to {{ compared_value }}.</source>
<target>Dylai'r gwerth hwn fod yn gyfartal â {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="66">
<source>This value should be greater than {{ compared_value }}.</source>
<target>Dylai'r gwerth hwn fod yn fwy na {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="67">
<source>This value should be greater than or equal to {{ compared_value }}.</source>
<target>Dylai'r gwerth hwn fod yn fwy na neu'n hafal i {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="68">
<source>This value should be identical to {{ compared_value_type }} {{ compared_value }}.</source>
<target>Dylai'r gwerth hwn fod yn union yr un fath â {{ compared_value_type }} {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="69">
<source>This value should be less than {{ compared_value }}.</source>
<target>Dylai'r gwerth hwn fod yn llai na {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="70">
<source>This value should be less than or equal to {{ compared_value }}.</source>
<target>Dylai'r gwerth hwn fod yn llai na neu'n hafal i {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="71">
<source>This value should not be equal to {{ compared_value }}.</source>
<target>Ni ddylai'r gwerth hwn fod yn hafal i {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="72">
<source>This value should not be identical to {{ compared_value_type }} {{ compared_value }}.</source>
<target>Ni ddylai'r gwerth hwn fod yn union yr un fath â {{ compared_value_type }} {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="73">
<source>The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.</source>
<target>Mae'r gymhareb delwedd yn rhy fawr ({{ ratio }}). Y gymhareb uchaf a ganiateir yw {{ max_ratio }}.</target>
</trans-unit>
<trans-unit id="74">
<source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source>
<target>Mae'r gymhareb delwedd yn rhy fach ({{ ratio }}). Y gymhareb isaf a ddisgwylir yw {{ min_ratio }}.</target>
</trans-unit>
<trans-unit id="75">
<source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source>
<target>Mae'r ddelwedd yn sgwâr ({{ width }}x{{ height }}px). Ni chaniateir delweddau sgwâr.</target>
</trans-unit>
<trans-unit id="76">
<source>The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.</source>
<target>Mae'r ddelwedd mewn fformat tirlun ({{ width }}x{{ height }}px). Ni chaniateir delweddau mewn fformat tirlun.</target>
</trans-unit>
<trans-unit id="77">
<source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source>
<target>Mae'r ddelwedd mewn fformat portread ({{ width }}x{{ height }}px). Ni chaniateir delweddau mewn fformat portread.</target>
</trans-unit>
<trans-unit id="78">
<source>An empty file is not allowed.</source>
<target>Ni chaniateir ffeil wag.</target>
</trans-unit>
<trans-unit id="79">
<source>The host could not be resolved.</source>
<target>Ni fu modd datrys y gwesteiwr.</target>
</trans-unit>
<trans-unit id="80">
<source>This value does not match the expected {{ charset }} charset.</source>
<target>Nid yw'r gwerth hwn yn cyfateb â'r {{ charset }} set nodau ddisgwyliedig.</target>
</trans-unit>
<trans-unit id="81">
<source>This is not a valid Business Identifier Code (BIC).</source>
<target>Nid yw hwn yn God Adnabod Busnes (BIC) dilys.</target>
</trans-unit>
<trans-unit id="82">
<source>Error</source>
<target>Gwall</target>
</trans-unit>
<trans-unit id="83">
<source>This is not a valid UUID.</source>
<target>Nid yw hyn yn UUID dilys.</target>
</trans-unit>
<trans-unit id="84">
<source>This value should be a multiple of {{ compared_value }}.</source>
<target>Dylai'r gwerth hwn fod yn luosrif o {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="85">
<source>This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.</source>
<target>Nid yw'r Cod Adnabod Busnes (BIC) hwn yn gysylltiedig ag IBAN {{ iban }}.</target>
</trans-unit>
</body>
</file>
</xliff>
@@ -326,6 +326,10 @@
<source>This value should be a multiple of {{ compared_value }}.</source>
<target>Dieser Wert sollte ein Vielfaches von {{ compared_value }} sein.</target>
</trans-unit>
<trans-unit id="85">
<source>This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.</source>
<target>Diese internationale Bankleitzahl (BIC) ist nicht mit der IBAN {{ iban }} assoziiert.</target>
</trans-unit>
</body>
</file>
</xliff>
@@ -326,6 +326,10 @@
<source>This value should be a multiple of {{ compared_value }}.</source>
<target>This value should be a multiple of {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="85">
<source>This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.</source>
<target>This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.</target>
</trans-unit>
</body>
</file>
</xliff>
@@ -326,6 +326,10 @@
<source>This value should be a multiple of {{ compared_value }}.</source>
<target>Este valor debería ser un múltiplo de {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="85">
<source>This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.</source>
<target>Este Código de Identificación Bancaria (BIC) no está asociado con el IBAN {{ iban }}.</target>
</trans-unit>
</body>
</file>
</xliff>
@@ -326,6 +326,10 @@
<source>This value should be a multiple of {{ compared_value }}.</source>
<target>Cette valeur doit être un multiple de {{ compared_value }}.</target>
</trans-unit>
<trans-unit id="85">
<source>This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.</source>
<target>Ce code d'identification d'entreprise (BIC) n'est pas associé à l'IBAN {{ iban }}.</target>
</trans-unit>
</body>
</file>
</xliff>
Oops, something went wrong.

0 comments on commit 1614a52

Please sign in to comment.
You can’t perform that action at this time.