Skip to content

Commit c29ef99

Browse files
committed
Merge branch '4.4' into 5.1
2 parents 360acad + 6aa3333 commit c29ef99

File tree

8 files changed

+60
-12
lines changed

8 files changed

+60
-12
lines changed

Constraints/FileValidator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function validate($value, Constraint $constraint)
6363
$binaryFormat = null === $constraint->binaryFormat ? true : $constraint->binaryFormat;
6464
}
6565

66-
list(, $limitAsString, $suffix) = $this->factorizeSizes(0, $limitInBytes, $binaryFormat);
66+
[, $limitAsString, $suffix] = $this->factorizeSizes(0, $limitInBytes, $binaryFormat);
6767
$this->context->buildViolation($constraint->uploadIniSizeErrorMessage)
6868
->setParameter('{{ limit }}', $limitAsString)
6969
->setParameter('{{ suffix }}', $suffix)
@@ -157,7 +157,7 @@ public function validate($value, Constraint $constraint)
157157
$limitInBytes = $constraint->maxSize;
158158

159159
if ($sizeInBytes > $limitInBytes) {
160-
list($sizeAsString, $limitAsString, $suffix) = $this->factorizeSizes($sizeInBytes, $limitInBytes, $constraint->binaryFormat);
160+
[$sizeAsString, $limitAsString, $suffix] = $this->factorizeSizes($sizeInBytes, $limitInBytes, $constraint->binaryFormat);
161161
$this->context->buildViolation($constraint->maxSizeMessage)
162162
->setParameter('{{ file }}', $this->formatValue($path))
163163
->setParameter('{{ size }}', $sizeAsString)

Constraints/NotCompromisedPasswordValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function validate($value, Constraint $constraint)
9191
}
9292

9393
foreach (explode("\r\n", $result) as $line) {
94-
list($hashSuffix, $count) = explode(':', $line);
94+
[$hashSuffix, $count] = explode(':', $line);
9595

9696
if ($hashPrefix.$hashSuffix === $hash && $constraint->threshold <= (int) $count) {
9797
$this->context->buildViolation($constraint->message)

Mapping/Loader/AbstractLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ protected function newConstraint(string $name, $options = null)
6969
if (false !== strpos($name, '\\') && class_exists($name)) {
7070
$className = (string) $name;
7171
} elseif (false !== strpos($name, ':')) {
72-
list($prefix, $className) = explode(':', $name, 2);
72+
[$prefix, $className] = explode(':', $name, 2);
7373

7474
if (!isset($this->namespaces[$prefix])) {
7575
throw new MappingException(sprintf('Undefined namespace prefix "%s".', $prefix));

Resources/translations/validators.fi.xlf

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@
336336
</trans-unit>
337337
<trans-unit id="87">
338338
<source>This collection should contain only unique elements.</source>
339-
<target>Tämä ryhmä tulisi sisältää vain yksilöllisiä arvoja.</target>
339+
<target>Tämän ryhmän tulisi sisältää vain yksilöllisiä arvoja.</target>
340340
</trans-unit>
341341
<trans-unit id="88">
342342
<source>This value should be positive.</source>
@@ -366,6 +366,26 @@
366366
<source>This value should be between {{ min }} and {{ max }}.</source>
367367
<target>Arvon tulisi olla välillä {{ min }} - {{ max }}.</target>
368368
</trans-unit>
369+
<trans-unit id="95">
370+
<source>This value is not a valid hostname.</source>
371+
<target>Arvo ei ole kelvollinen laitenimi (hostname).</target>
372+
</trans-unit>
373+
<trans-unit id="96">
374+
<source>The number of elements in this collection should be a multiple of {{ compared_value }}.</source>
375+
<target>Ryhmässä olevien elementtien määrän pitää olla monikerta luvulle {{ compared_value }}.</target>
376+
</trans-unit>
377+
<trans-unit id="97">
378+
<source>This value should satisfy at least one of the following constraints:</source>
379+
<target>Tämän arvon tulee läpäistä vähintään yksi seuraavista tarkistuksista:</target>
380+
</trans-unit>
381+
<trans-unit id="98">
382+
<source>Each element of this collection should satisfy its own set of constraints.</source>
383+
<target>Ryhmän jokaisen elementin tulee läpäistä omat tarkistuksensa.</target>
384+
</trans-unit>
385+
<trans-unit id="99">
386+
<source>This value is not a valid International Securities Identification Number (ISIN).</source>
387+
<target>Tämä arvo ei ole kelvollinen ISIN-koodi (International Securities Identification Number).</target>
388+
</trans-unit>
369389
</body>
370390
</file>
371391
</xliff>

Resources/translations/validators.th.xlf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,26 @@
366366
<source>This value should be between {{ min }} and {{ max }}.</source>
367367
<target>ค่านี้ควรอยู่ระหว่าง {{ min }} ถึง {{ max }}</target>
368368
</trans-unit>
369+
<trans-unit id="95">
370+
<source>This value is not a valid hostname.</source>
371+
<target>ค่าโฮสต์เนมไม่ถูกต้อง</target>
372+
</trans-unit>
373+
<trans-unit id="96">
374+
<source>The number of elements in this collection should be a multiple of {{ compared_value }}.</source>
375+
<target>จำนวนของสมาชิกในคอเล็กชั่นควรเป็นพหุคูณของ {{ compared_value }}</target>
376+
</trans-unit>
377+
<trans-unit id="97">
378+
<source>This value should satisfy at least one of the following constraints:</source>
379+
<target>ค่านี้ควรเป็นไปตามข้อจำกัดอย่างน้อยหนึ่งข้อจากข้อจำกัดเหล่านี้:</target>
380+
</trans-unit>
381+
<trans-unit id="98">
382+
<source>Each element of this collection should satisfy its own set of constraints.</source>
383+
<target>สมากชิกแต่ละตัวในคอเล็กชั่นควรเป็นไปตามเซ็ตข้อจำกัดของคอเล็กชั่น</target>
384+
</trans-unit>
385+
<trans-unit id="99">
386+
<source>This value is not a valid International Securities Identification Number (ISIN).</source>
387+
<target>ค่า​รหัสหลักทรัพย์สากล (ISIN) ไม่ถูกต้อง</target>
388+
</trans-unit>
369389
</body>
370390
</file>
371391
</xliff>

Resources/translations/validators.tl.xlf

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@
6868
</trans-unit>
6969
<trans-unit id="17">
7070
<source>The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.</source>
71-
<target>Ang uri ng file ng mime ay hindi balido ({{ type }}).Ang mga pinapayagang uri ng mime ay ang {{ types }}.</target>
71+
<target>Ang uri ng file ng mime ay hindi balido ({{ type }}). Ang mga pinapayagang uri ng mime ay ang {{ types }}.</target>
7272
</trans-unit>
7373
<trans-unit id="18">
7474
<source>This value should be {{ limit }} or less.</source>
7575
<target>Ang halaga nito ay dapat na {{ limit }} or maliit pa.</target>
7676
</trans-unit>
7777
<trans-unit id="19">
7878
<source>This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.</source>
79-
<target>Ang halaga nito ay masyadong mahaba.Ito ay dapat na {{ limit }} karakter o maliit pa.|Ang halaga nito ay masyadong mahaba. Ito ay dapat na {{ limit }} mga karakter o maliit pa.</target>
79+
<target>Ang halaga nito ay masyadong mahaba. Ito ay dapat na {{ limit }} karakter o maliit pa.|Ang halaga nito ay masyadong mahaba. Ito ay dapat na {{ limit }} mga karakter o maliit pa.</target>
8080
</trans-unit>
8181
<trans-unit id="20">
8282
<source>This value should be {{ limit }} or more.</source>
@@ -268,7 +268,7 @@
268268
</trans-unit>
269269
<trans-unit id="70">
270270
<source>This value should be less than or equal to {{ compared_value }}.</source>
271-
<target>Ang halagang ito ay dapat mas mmaliit o magkapareha sa {{ compared_value }}.</target>
271+
<target>Ang halagang ito ay dapat mas maliit o magkapareha sa {{ compared_value }}.</target>
272272
</trans-unit>
273273
<trans-unit id="71">
274274
<source>This value should not be equal to {{ compared_value }}.</source>
@@ -284,7 +284,7 @@
284284
</trans-unit>
285285
<trans-unit id="74">
286286
<source>The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.</source>
287-
<target>ng ratio ng imahe ay masyadong maliit ({{ ratio }}). Ang pinamaliit na ratio ay {{ min_ratio }}.</target>
287+
<target>Ang ratio ng imahe ay masyadong maliit ({{ ratio }}). Ang pinakamaliit na ratio ay {{ min_ratio }}.</target>
288288
</trans-unit>
289289
<trans-unit id="75">
290290
<source>The image is square ({{ width }}x{{ height }}px). Square images are not allowed.</source>
@@ -296,7 +296,7 @@
296296
</trans-unit>
297297
<trans-unit id="77">
298298
<source>The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.</source>
299-
<target>Ang orientasyon ng imahe ay nakaportrait ({{ width }}x{{ height }}px). PAng mga imaheng nakaportrait ang orientasyon ay hindi pwede.</target>
299+
<target>Ang orientasyon ng imahe ay nakaportrait ({{ width }}x{{ height }}px). Ang mga imaheng nakaportrait ang orientasyon ay hindi pwede.</target>
300300
</trans-unit>
301301
<trans-unit id="78">
302302
<source>An empty file is not allowed.</source>
@@ -374,6 +374,14 @@
374374
<source>The number of elements in this collection should be a multiple of {{ compared_value }}.</source>
375375
<target>Ang bilang ng mga elemento sa koleksyon na ito ay dapat multiple ng {{ compared_value }}.</target>
376376
</trans-unit>
377+
<trans-unit id="97">
378+
<source>This value should satisfy at least one of the following constraints:</source>
379+
<target>Ang halagang ito ay dapat masunod ang kahit na isang sumusunod na batayan.</target>
380+
</trans-unit>
381+
<trans-unit id="98">
382+
<source>Each element of this collection should satisfy its own set of constraints.</source>
383+
<target>Ang bawat elemento sa koleksyon na ito ay dapat masunod ang nararapat na batayan.</target>
384+
</trans-unit>
377385
<trans-unit id="99">
378386
<source>This value is not a valid International Securities Identification Number (ISIN).</source>
379387
<target>Ang halagang ito ay hindi wastong International Securities Identification Number (ISIN).</target>

Tests/Constraints/AbstractComparisonValidatorTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public function testInvalidComparisonToValue($dirtyValue, $dirtyValueAsString, $
202202

203203
public function testInvalidComparisonToPropertyPathAddsPathAsParameter()
204204
{
205-
list($dirtyValue, $dirtyValueAsString, $comparedValue, $comparedValueString, $comparedValueType) = current($this->provideAllInvalidComparisons());
205+
[$dirtyValue, $dirtyValueAsString, $comparedValue, $comparedValueString, $comparedValueType] = current($this->provideAllInvalidComparisons());
206206

207207
$constraint = $this->createConstraint(['propertyPath' => 'value']);
208208
$constraint->message = 'Constraint Message';

Tests/Constraints/FileValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ public function uploadedFileErrorProvider()
456456
$reflection = new \ReflectionClass(\get_class(new FileValidator()));
457457
$method = $reflection->getMethod('factorizeSizes');
458458
$method->setAccessible(true);
459-
list(, $limit, $suffix) = $method->invokeArgs(new FileValidator(), [0, UploadedFile::getMaxFilesize(), false]);
459+
[, $limit, $suffix] = $method->invokeArgs(new FileValidator(), [0, UploadedFile::getMaxFilesize(), false]);
460460

461461
// it correctly parses the maxSize option and not only uses simple string comparison
462462
// 1000M should be bigger than the ini value

0 commit comments

Comments
 (0)