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

Skip to content

Commit d56dd3e

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: [HttpFoundation] Drop int return type from parseFilesize() Added $translator->addLoader() bug symfony/symfony#39878 [doctrine-bridge] Add username to UserNameNotFoundException fix spelling Add check for constant in Curl client Revert #38614, add assert to avoid regression Fix problem when SYMFONY_PHPUNIT_VERSION is empty string value Update PHP CS Fixer config to v2.18
2 parents 1470f27 + ac0fbf6 commit d56dd3e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Constraints/FileValidator.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,10 @@ private static function moreDecimalsThan(string $double, int $numberOfDecimals):
214214
/**
215215
* Convert the limit to the smallest possible number
216216
* (i.e. try "MB", then "kB", then "bytes").
217+
*
218+
* @param int|float $limit
217219
*/
218-
private function factorizeSizes(int $size, int $limit, bool $binaryFormat): array
220+
private function factorizeSizes(int $size, $limit, bool $binaryFormat): array
219221
{
220222
if ($binaryFormat) {
221223
$coef = self::MIB_BYTES;

Resources/translations/validators.he.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>הערך קצר מידי. הוא צריך להכיל {{ limit }} תווים לפחות.|הערך קצר מידיץ הוא צריך להכיל {{ limit }} תווים לפחות.</target>
87+
<target>הערך קצר מידי. הוא צריך להכיל {{ limit }} תווים לפחות.|הערך קצר מידי. הערך צריך להכיל {{ limit }} תווים לפחות.</target>
8888
</trans-unit>
8989
<trans-unit id="22">
9090
<source>This value should not be blank.</source>

Tests/Constraints/FileValidatorTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,14 +459,12 @@ public function uploadedFileErrorProvider()
459459
[, $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
462-
// 1000M should be bigger than the ini value
462+
// 1000G should be bigger than the ini value
463463
$tests[] = [(string) \UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', [
464464
'{{ limit }}' => $limit,
465465
'{{ suffix }}' => $suffix,
466-
], '1000M'];
466+
], '1000G'];
467467

468-
// it correctly parses the maxSize option and not only uses simple string comparison
469-
// 1000M should be bigger than the ini value
470468
$tests[] = [(string) \UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', [
471469
'{{ limit }}' => '0.1',
472470
'{{ suffix }}' => 'MB',

0 commit comments

Comments
 (0)
0