Merge branch '3.4' into 4.4

* 3.4:
  [HttpFoundation] Skip the cookie_max_age fixture on PHP 8.
  add choice_translation_domain tests to prevent further regressions
  Update validators.tr.xlf
This commit is contained in:
Fabien Potencier 2020-09-13 07:00:26 +02:00
commit f2e7158bc0
4 changed files with 39 additions and 2 deletions

View File

@ -137,6 +137,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');

View File

@ -28,7 +28,7 @@
"symfony/stopwatch": "^3.4|^4.0|^5.0",
"symfony/config": "^4.2|^5.0",
"symfony/dependency-injection": "^3.4|^4.0|^5.0",
"symfony/form": "^4.4|^5.0",
"symfony/form": "^4.4.11|^5.0.11",
"symfony/http-kernel": "^4.3.7",
"symfony/messenger": "^4.4|^5.0",
"symfony/property-access": "^3.4|^4.0|^5.0",

View File

@ -42,6 +42,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);
}

View File

@ -84,7 +84,7 @@
</trans-unit>
<trans-unit id="21">
<source>This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.</source>
<target>Bu değer çok kısa. {{ limit }} karakter veya daha fazla olmaldır.</target>
<target>Bu değer çok kısa. {{ limit }} karakter veya daha fazla olmalıdır.</target>
</trans-unit>
<trans-unit id="22">
<source>This value should not be blank.</source>