Skip to content

Commit 9b30f61

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 86ace6a + da918f6 commit 9b30f61

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Extension/Core/Type/FileType.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,10 @@ private function getFileUploadError(int $errorCode)
171171
* Returns the maximum size of an uploaded file as configured in php.ini.
172172
*
173173
* This method should be kept in sync with Symfony\Component\HttpFoundation\File\UploadedFile::getMaxFilesize().
174+
*
175+
* @return int|float The maximum size of an uploaded file in bytes (returns float if size > PHP_INT_MAX)
174176
*/
175-
private static function getMaxFilesize(): int
177+
private static function getMaxFilesize()
176178
{
177179
$iniMax = strtolower(ini_get('upload_max_filesize'));
178180

@@ -207,8 +209,10 @@ private static function getMaxFilesize(): int
207209
* (i.e. try "MB", then "kB", then "bytes").
208210
*
209211
* This method should be kept in sync with Symfony\Component\Validator\Constraints\FileValidator::factorizeSizes().
212+
*
213+
* @param int|float $limit
210214
*/
211-
private function factorizeSizes(int $size, int $limit)
215+
private function factorizeSizes(int $size, $limit)
212216
{
213217
$coef = self::MIB_BYTES;
214218
$coefFactor = self::KIB_BYTES;

0 commit comments

Comments
 (0)