8000 Merge branch '3.4' into 4.4 · symfony/symfony@f2e7158 · GitHub
[go: up one dir, main page]

Skip to content

Commit f2e7158

Browse files
committed
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
2 parents efb255c + 71e8028 commit f2e7158

File tree

4 files changed

+39
-2
lines changed

4 files changed

+39
-2
lines changed

src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,39 @@ public function testInvalidClassOption()
137137
]);
138138
}
139139

140+
/**
141+
* @dataProvider choiceTranslationDomainProvider
142+
*/
143+
public function testChoiceTranslationDomainIsDisabledByDefault($expanded)
144+
{
145+
$entity1 = new SingleIntIdEntity(1, 'Foo');
146+
147+
$this->persist([$entity1]);
148+
149+
$field = $this->factory->createNamed('name', static::TESTED_TYPE, null, [
150+
'choices' => [
151+
$entity1,
152+
],
153+
'class' => SingleIntIdEntity::class,
154+
'em' => 'default',
155+
'expanded' => $expanded,
156+
]);
157+
158+
if ($expanded) {
159+
$this->assertFalse($field->get('1')->getConfig()->getOption('translation_domain'));
160+
} else {
161+
$this->assertFalse($field->getConfig()->getOption('choice_translation_domain'));
162+
}
163+
}
164+
165+
public function choiceTranslationDomainProvider()
166+
{
167+
return [
168+
[false],
169+
[true],
170+
];
171+
}
172+
140173
public function testSetDataToUninitializedEntityWithNonRequired()
141174
{
142175
$entity1 = new SingleIntIdEntity(1, 'Foo');

src/Symfony/Bridge/Doctrine/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"symfony/stopwatch": "^3.4|^4.0|^5.0",
2929
"symfony/config": "^4.2|^5.0",
3030
"symfony/dependency-injection": "^3.4|^4.0|^5.0",
31-
"symfony/form": "^4.4|^5.0",
31+
"symfony/form": "^4.4.11|^5.0.11",
3232
"symfony/http-kernel": "^4.3.7",
3333
"symfony/messenger": "^4.4|^5.0",
3434
"symfony/property-access": "^3.4|^4.0|^5.0",

src/Symfony/Component/HttpFoundation/Tests/ResponseFunctionalTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ public static function tearDownAfterClass(): void
4242
*/
4343
public function testCookie($fixture)
4444
{
45+
if (\PHP_VERSION_ID >= 80000 && 'cookie_max_age' === $fixture) {
46+
$this->markTestSkipped('This fixture produces a fatal error on PHP 8.');
47+
}
48+
4549
$result = file_get_contents(sprintf('http://localhost:8054/%s.php', $fixture));
4650
$this->assertStringMatchesFormatFile(__DIR__.sprintf('/Fixtures/response-functional/%s.expected', $fixture), $result);
4751
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
</trans-unit>
8585
<trans-unit id="21">
8686
<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>
87-
<target>Bu değer çok kısa. {{ limit }} karakter veya daha fazla olmaldır.</target>
87+
<target>Bu değer çok kısa. {{ limit }} karakter veya daha fazla olmalıdır.</target>
8888
</trans-unit>
8989
<trans-unit id="22">
9090
<source>This value should not be blank.</source>

0 commit comments

Comments
 (0)
0