From f346eccb60aaf11982a5a9020df8fe7e4d8f5e15 Mon Sep 17 00:00:00 2001 From: Ramazan Date: Fri, 11 Sep 2020 17:35:30 +0300 Subject: [PATCH 1/4] Update validators.tr.xlf Turkish Spelling error corrected. --- .../Validator/Resources/translations/validators.tr.xlf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf index a23c652b17..76de2214e6 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf @@ -84,7 +84,7 @@ This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Bu değer çok kısa. {{ limit }} karakter veya daha fazla olmaldır. + Bu değer çok kısa. {{ limit }} karakter veya daha fazla olmalıdır. This value should not be blank. From 7775b3707b5b6337530e04aba4f643de14919305 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 12 Sep 2020 14:53:51 +0200 Subject: [PATCH 2/4] add choice_translation_domain tests to prevent further regressions --- .../Tests/Form/Type/EntityTypeTest.php | 33 +++++++++++++++++++ src/Symfony/Bridge/Doctrine/composer.json | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php index 4d5691e223..1d382a95aa 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php @@ -138,6 +138,39 @@ class EntityTypeTest extends BaseTypeTest ]); } + /** + * @dataProvider choiceTranslationDomainProvider + */ + public function testChoiceTranslationDomainIsDisabledByDefault($expanded) + { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + + $this->persist([$entity1]); + + $field = $this->factory->createNamed('name', static::TESTED_TYPE, null, [ + 'choices' => [ + $entity1, + ], + 'class' => SingleIntIdEntity::class, + 'em' => 'default', + 'expanded' => $expanded, + ]); + + if ($expanded) { + $this->assertFalse($field->get('1')->getConfig()->getOption('translation_domain')); + } else { + $this->assertFalse($field->getConfig()->getOption('choice_translation_domain')); + } + } + + public function choiceTranslationDomainProvider() + { + return [ + [false], + [true], + ]; + } + public function testSetDataToUninitializedEntityWithNonRequired() { $entity1 = new SingleIntIdEntity(1, 'Foo'); diff --git a/src/Symfony/Bridge/Doctrine/composer.json b/src/Symfony/Bridge/Doctrine/composer.json index d33ea16ea6..0ad66ccf72 100644 --- a/src/Symfony/Bridge/Doctrine/composer.json +++ b/src/Symfony/Bridge/Doctrine/composer.json @@ -25,7 +25,7 @@ "doctrine/annotations": "~1.7", "symfony/stopwatch": "~2.8|~3.0|~4.0", "symfony/dependency-injection": "~3.4|~4.0", - "symfony/form": "^3.3.10|~4.0", + "symfony/form": "^3.4.43|~4.4.11", "symfony/http-kernel": "~2.8|~3.0|~4.0", "symfony/property-access": "~2.8|~3.0|~4.0", "symfony/property-info": "~2.8|3.0|~4.0", From d6d9b2927d201b2a592c9966541b20813e3b1d02 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Sat, 12 Sep 2020 22:41:00 +0200 Subject: [PATCH 3/4] [HttpFoundation] Skip the cookie_max_age fixture on PHP 8. --- .../Component/HttpFoundation/Tests/ResponseFunctionalTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php b/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php index c908b1b993..7aad1cac2c 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php @@ -45,6 +45,10 @@ class ResponseFunctionalTest extends TestCase */ public function testCookie($fixture) { + if (\PHP_VERSION_ID >= 80000 && 'cookie_max_age' === $fixture) { + $this->markTestSkipped('This fixture produces a fatal error on PHP 8.'); + } + $result = file_get_contents(sprintf('http://localhost:8054/%s.php', $fixture)); $this->assertStringMatchesFormatFile(__DIR__.sprintf('/Fixtures/response-functional/%s.expected', $fixture), $result); } From 7d55e0c065bd2581aac3054a46d2195065654b6b Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Sat, 12 Sep 2020 23:46:40 +0200 Subject: [PATCH 4/4] Internal classes are not legacy. --- .../Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php index ed1528f6c9..911d37495e 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php @@ -143,6 +143,10 @@ class Deprecation public function isLegacy() { $class = $this->originatingClass(); + if ((new \ReflectionClass($class))->isInternal()) { + return false; + } + $method = $this->originatingMethod(); return 0 === strpos($method, 'testLegacy')