Skip to content

Commit 16bacb1

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: Update translations for Norwegian Nynorsk (nn) #38756 Fix eventListener initialization when eventSubscriber constructor dispatch an event clear unchecked choice radio boxes even if clear missing is set to false [ErrorHandler] Added missing type annotations to FlattenException [TwigBridge] Allow version 3 of the Twig extra packages Fix FrameworkBundle PropertyAccess definition when not in debug
2 parents 74c3c5f + 756522e commit 16bacb1

File tree

10 files changed

+225
-37
lines changed

10 files changed

+225
-37
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@
149149
"symfony/phpunit-bridge": "^5.2",
150150
"symfony/security-acl": "~2.8|~3.0",
151151
"phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0",
152-
"twig/cssinliner-extra": "^2.12",
153-
"twig/inky-extra": "^2.12",
154-
"twig/markdown-extra": "^2.12"
152+
"twig/cssinliner-extra": "^2.12|^3",
153+
"twig/inky-extra": "^2.12|^3",
154+
"twig/markdown-extra": "^2.12|^3"
155155
},
156156
"conflict": {
157157
"doctrine/dbal": "<2.10",

src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ private function initializeSubscribers()
177177
if (!isset($this->listeners[$event])) {
178178
$this->listeners[$event] = [];
179179
}
180+
unset($this->initialized[$event]);
180181
$this->listeners[$event] += $listeners;
181182
}
182183
$this->subscribers = [];

src/Symfony/Bridge/Twig/composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@
4747
"symfony/expression-language": "^4.4|^5.0",
4848
"symfony/web-link": "^4.4|^5.0",
4949
"symfony/workflow": "^5.2",
50-
"twig/cssinliner-extra": "^2.12",
51-
"twig/inky-extra": "^2.12",
52-
"twig/markdown-extra": "^2.12"
50+
"twig/cssinliner-extra": "^2.12|^3",
51+
"twig/inky-extra": "^2.12|^3",
52+
"twig/markdown-extra": "^2.12|^3"
5353
},
5454
"conflict": {
5555
"phpdocumentor/reflection-docblock": "<3.2.2",

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1997,7 +1997,7 @@ private function registerCacheConfiguration(array $config, ContainerBuilder $con
19971997

19981998
if (!$container->getParameter('kernel.debug')) {
19991999
$propertyAccessDefinition->setFactory([PropertyAccessor::class, 'createCache']);
2000-
$propertyAccessDefinition->setArguments([null, 0, $version, new Reference('logger', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]);
2000+
$propertyAccessDefinition->setArguments(['', 0, $version, new Reference('logger', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]);
20012001
$propertyAccessDefinition->addTag('cache.pool', ['clearer' => 'cache.system_clearer']);
20022002
$propertyAccessDefinition->addTag('monolog.logger', ['channel' => 'cache']);
20032003
} else {

src/Symfony/Component/ErrorHandler/Exception/FlattenException.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,40 @@
2424
*/
2525
class FlattenException
2626
{
27+
/** @var string */
2728
private $message;
29+
30+
/** @var int|string */
2831
private $code;
32+
33+
/** @var self|null */
2934
private $previous;
35+
36+
/** @var array */
3037
private $trace;
38+
39+
/** @var string */
3140
private $traceAsString;
41+
42+
/** @var string */
3243
private $class;
44+
45+
/** @var int */
3346
private $statusCode;
47+
48+
/** @var string */
3449
private $statusText;
50+
51+
/** @var array */
3552
private $headers;
53+
54+
/** @var string */
3655
private $file;
56+
57+
/** @var int */
3758
private $line;
59+
60+
/** @var string|null */
3861
private $asString;
3962

4063
/**
@@ -108,6 +131,8 @@ public function getStatusCode(): int
108131
}
109132

110133
/**
134+
* @param int $code
135+
*
111136
* @return $this
112137
*/
113138
public function setStatusCode($code): self
@@ -138,6 +163,8 @@ public function getClass(): string
138163
}
139164

140165
/**
166+
* @param string $class
167+
*
141168
* @return $this
142169
*/
143170
public function setClass($class): self
@@ -153,6 +180,8 @@ public function getFile(): string
153180
}
154181

155182
/**
183+
* @param string $file
184+
*
156185
* @return $this
157186
*/
158187
public function setFile($file): self
@@ -168,6 +197,8 @@ public function getLine(): int
168197
}
169198

170199
/**
200+
* @param int $line
201+
*
171202
* @return $this
172203
*/
173204
public function setLine($line): self
@@ -195,6 +226,8 @@ public function getMessage(): string
195226
}
196227

197228
/**
229+
* @param string $message
230+
*
198231
* @return $this
199232
*/
200233
public function setMessage($message): self
@@ -219,6 +252,8 @@ public function getCode()
219252
}
220253

221254
/**
255+
* @param int|string $code
256+
*
222257
* @return $this
223258
*/
224259
public function setCode($code): self
@@ -273,6 +308,10 @@ public function setTraceFromThrowable(\Throwable $throwable): self
273308
}
274309

275310
/**
311+
* @param array $trace
312+
* @param string|null $file
313+
* @param int|null $line
314+
*
276315
* @return $this
277316
*/
278317
public function setTrace($trace, $file, $line): self

src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ public function buildForm(FormBuilderInterface $builder, array $options)
159159
$knownValues[$child->getName()] = $value;
160160
unset($unknownValues[$value]);
161161
continue;
162+
} else {
163+
$knownValues[$child->getName()] = null;
162164
}
163165
}
164166
} else {

src/Symfony/Component/Form/Resources/translations/validators.nn.xlf

Lines changed: 121 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<body>
55
<trans-unit id="28">
66
<source>This form should not contain extra fields.</source>
7-
<target>Feltgruppa ikkje innehalde ekstra felt.</target>
7+
<target>Feltgruppa kan ikkje innehalde ekstra felt.</target>
88
</trans-unit>
99
<trans-unit id="29">
1010
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
@@ -14,6 +14,126 @@
1414
<source>The CSRF token is invalid.</source>
1515
<target>CSRF-nøkkelen er ikkje gyldig.</target>
1616
</trans-unit>
17+
<trans-unit id="99">
18+
<source>This value is not a valid HTML5 color.</source>
19+
<target>Verdien er ikkje ein gyldig HTML5-farge.</target>
20+
</trans-unit>
21+
<trans-unit id="100">
22+
<source>Please enter a valid birthdate.</source>
23+
<target>Gje opp ein gyldig fødselsdato.</target>
24+
</trans-unit>
25+
<trans-unit id="101">
26+
<source>The selected choice is invalid.</source>
27+
<target>Valget du gjorde er ikkje gyldig.</target>
28+
</trans-unit>
29+
<trans-unit id="102">
30+
<source>The collection is invalid.</source>
31+
<target>Samlinga er ikkje gyldig.</target>
32+
</trans-unit>
33+
<trans-unit id="103">
34+
<source>Please select a valid color.</source>
35+
<target>Gje opp ein gyldig farge.</target>
36+
</trans-unit>
37+
<trans-unit id="104">
38+
<source>Please select a valid country.</source>
39+
<target>Gje opp eit gyldig land.</target>
40+
</trans-unit>
41+
<trans-unit id="105">
42+
<source>Please select a valid currency.</source>
43+
<target>Gje opp ein gyldig valuta.</target>
44+
</trans-unit>
45+
<trans-unit id="106">
46+
<source>Please choose a valid date interval.</source>
47+
<target>Gje opp eit gyldig datointervall.</target>
48+
</trans-unit>
49+
<trans-unit id="107">
50+
<source>Please enter a valid date and time.</source>
51+
<target>Gje opp ein gyldig dato og tid.</target>
52+
</trans-unit>
53+
<trans-unit id="108">
54+
<source>Please enter a valid date.</source>
55+
<target>Gje opp ein gyldig dato.</target>
56+
</trans-unit>
57+
<trans-unit id="109">
58+
<source>Please select a valid file.</source>
59+
<target>Velg ei gyldig fil.</target>
60+
</trans-unit>
61+
<trans-unit id="110">
62+
<source>The hidden field is invalid.</source>
63+
<target>Det skjulte feltet er ikkje gyldig.</target>
64+
</trans-unit>
65+
<trans-unit id="111">
66+
<source>Please enter an integer.</source>
67+
<target>Gje opp eit heiltal.</target>
68+
</trans-unit>
69+
<trans-unit id="112">
70+
<source>Please select a valid language.</source>
71+
<target>Gje opp eit gyldig språk.</target>
72+
</trans-unit>
73+
<trans-unit id="113">
74+
<source>Please select a valid locale.</source>
75+
<target>Gje opp eit gyldig locale.</target>
76+
</trans-unit>
77+
<trans-unit id="114">
78+
<source>Please enter a valid money amount.</source>
79+
<target>Gje opp ein gyldig sum pengar.</target>
80+
</trans-unit>
81+
<trans-unit id="115">
82+
<source>Please enter a number.</source>
83+
<target>Gje opp eit nummer.</target>
84+
</trans-unit>
85+
<trans-unit id="116">
86+
<source>The password is invalid.</source>
87+
<target>Passordet er ikkje gyldig.</target>
88+
</trans-unit>
89+
<trans-unit id="117">
90+
<source>Please enter a percentage value.</source>
91+
<target>Gje opp ein prosentverdi.</target>
92+
</trans-unit>
93+
<trans-unit id="118">
94+
<source>The values do not match.</source>
95+
<target>Verdiane er ikkje eins.</target>
96+
</trans-unit>
97+
<trans-unit id="119">
98+
<source>Please enter a valid time.</source>
99+
<target>Gje opp ei gyldig tid.</target>
100+
</trans-unit>
101+
<trans-unit id="120">
102+
<source>Please select a valid timezone.</source>
103+
<target>Gje opp ei gyldig tidssone.</target>
104+
</trans-unit>
105+
<trans-unit id="121">
106+
<source>Please enter a valid URL.</source>
107+
<target>Gje opp ein gyldig URL.</target>
108+
</trans-unit>
109+
<trans-unit id="122">
110+
<source>Please enter a valid search term.</source>
111+
<target>Gje opp gyldige søkjeord.</target>
112+
</trans-unit>
113+
<trans-unit id="123">
114+
<source>Please provide a valid phone number.</source>
115+
<target>Gje opp eit gyldig telefonnummer.</target>
116+
</trans-unit>
117+
<trans-unit id="124">
118+
<source>The checkbox has an invalid value.</source>
119+
<target>Sjekkboksen har ein ugyldig verdi.</target>
120+
</trans-unit>
121+
<trans-unit id="125">
122+
<source>Please enter a valid email address.</source>
123+
<target>Gje opp ei gyldig e-postadresse.</target>
124+
</trans-unit>
125+
<trans-unit id="126">
126+
<source>Please select a valid option.</source>
127+
<target>Velg eit gyldig vilkår.</target>
128+
</trans-unit>
129+
<trans-unit id="127">
130+
<source>Please select a valid range.</source>
131+
<target>Velg eit gyldig spenn.</target>
132+
</trans-unit>
133+
<trans-unit id="128">
134+
<source>Please enter a valid week.</source>
135+
<target>Gje opp ei gyldig veke.</target>
136+
</trans-unit>
17137
</body>
18138
</file>
19139
</xliff>

src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,6 +1321,20 @@ public function testSubmitSingleExpandedObjectChoices()
13211321
$this->assertNull($form[4]->getViewData());
13221322
}
13231323

1324+
public function testSubmitSingleExpandedClearMissingFalse()
1325+
{
1326+
$form = $this->factory->create(self::TESTED_TYPE, 'foo', [
1327+
'choices' => [
1328+
'foo label' => 'foo',
1329+
'bar label' => 'bar',
1330+
],
1331+
'expanded' => true,
1332+
]);
1333+
$form->submit('bar', false);
1334+
1335+
$this->assertSame('bar', $form->getData());
1336+
}
1337+
13241338
public function testSubmitMultipleExpanded()
13251339
{
13261340
$form = $this->factory->create(static::TESTED_TYPE, null, [

src/Symfony/Component/Security/Core/Resources/translations/security.nn.xlf

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
</trans-unit>
3737
<trans-unit id="10">
3838
<source>No session available, it either timed out or cookies are not enabled.</source>
39-
<target>Ingen sesjon tilgjengeleg. Sesjonen er anten ikkje lenger gyldig, eller informasjonskapslar er ikke skrudd på i nettlesaren.</target>
39+
<target>Ingen sesjon tilgjengeleg. Sesjonen er anten ikkje lenger gyldig, eller informasjonskapslar er ikkje skrudd på i nettlesaren.</target>
4040
</trans-unit>
4141
<trans-unit id="11">
4242
<source>No token could be found.</source>
@@ -56,12 +56,20 @@
5656
</trans-unit>
5757
<trans-unit id="15">
5858
<source>Account is disabled.</source>
59-
<target>Brukarkontoen er deaktivert.</target>
59+
<target>Brukarkontoen er sperra.</target>
6060
</trans-unit>
6161
<trans-unit id="16">
6262
<source>Account is locked.</source>
6363
<target>Brukarkontoen er sperra.</target>
6464
</trans-unit>
65+
<trans-unit id="17">
66+
<source>Too many failed login attempts, please try again later.</source>
67+
<target>For mange innloggingsforsøk har feila, prøv igjen seinare.</target>
68+
</trans-unit>
69+
<trans-unit id="18">
70+
<source>Invalid or expired login link.</source>
71+
<target>Innloggingslenka er ugyldig eller utgjengen.</target>
72+
</trans-unit>
6573
</body>
6674
</file>
6775
</xliff>

0 commit comments

Comments
 (0)