[HttpFoundation] Add settable permissions and adopt stricter defaults

by @diogogithub

Some issues have been detected in this pull request

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/symfony/symfony/42271/c1e604a2dcbd2d1589302f0ff079463f86c95cc6/cs.diff | patch -p0
diff -ru src/Symfony/Component/HttpFoundation/File/UploadedFile.php src/Symfony/Component/HttpFoundation/File/UploadedFile.php
--- src/Symfony/Component/HttpFoundation/File/UploadedFile.php	2024-05-15 12:22:41.439396935 +0000
+++ src/Symfony/Component/HttpFoundation/File/UploadedFile.php	2024-05-15 12:22:43.033453050 +0000
@@ -209,8 +209,8 @@
      */
     public static function getMaxFilesize(): int|float
     {
-        $sizePostMax = self::parseFilesize(ini_get('post_max_size'));
-        $sizeUploadMax = self::parseFilesize(ini_get('upload_max_filesize'));
+        $sizePostMax = self::parseFilesize(\ini_get('post_max_size'));
+        $sizeUploadMax = self::parseFilesize(\ini_get('upload_max_filesize'));
 
         return min($sizePostMax ?: \PHP_INT_MAX, $sizeUploadMax ?: \PHP_INT_MAX);
     }
@@ -234,11 +234,11 @@
 
         switch (substr($size, -1)) {
             case 't': $max *= 1024;
-            // no break
+                // no break
             case 'g': $max *= 1024;
-            // no break
+                // no break
             case 'm': $max *= 1024;
-            // no break
+                // no break
             case 'k': $max *= 1024;
         }
 

0
Common Typos

0
License Headers

0
Pull Request Contributor Headers

0
File Permissions

0
Merge Commits

0
Exception Messages Formatting

0
Usage of void in test files

0
Use ::class whenever possible

0
Deprecation Messages