From 9a5e6965828342e2a2d5f888e5ca70aa0558c88b Mon Sep 17 00:00:00 2001 From: mondrake Date: Sun, 21 Sep 2025 14:18:28 +0200 Subject: [PATCH 1/6] Update map --- src/Map/DefaultMap.php | 291 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 291 insertions(+) diff --git a/src/Map/DefaultMap.php b/src/Map/DefaultMap.php index 344ebbab..ce7c3652 100644 --- a/src/Map/DefaultMap.php +++ b/src/Map/DefaultMap.php @@ -408,6 +408,17 @@ public function getFileName(): string 0 => 'gz', ), ), + 'application/har+json' => + array ( + 'desc' => + array ( + 0 => 'HTTP archive', + ), + 'e' => + array ( + 0 => 'har', + ), + ), 'application/hta' => array ( 'desc' => @@ -5332,6 +5343,17 @@ public function getFileName(): string 0 => 'ace', ), ), + 'application/x-alpine-package-keeper-package' => + array ( + 'desc' => + array ( + 0 => 'Alpine Package Keeper package', + ), + 'e' => + array ( + 0 => 'apk', + ), + ), 'application/x-alz' => array ( 'desc' => @@ -5343,6 +5365,18 @@ public function getFileName(): string 0 => 'alz', ), ), + 'application/x-amf' => + array ( + 'desc' => + array ( + 0 => 'AMF 3D model', + 1 => 'AMF: Additive Manufacturing File', + ), + 'e' => + array ( + 0 => 'amf', + ), + ), 'application/x-amiga-disk-format' => array ( 'desc' => @@ -8062,6 +8096,10 @@ public function getFileName(): string ), 'application/x-ruby' => array ( + 'a' => + array ( + 0 => 'text/x-ruby', + ), 'desc' => array ( 0 => 'Ruby script', @@ -9063,6 +9101,58 @@ public function getFileName(): string 1 => 'tzst', ), ), + 'application/x.sf3-archive' => + array ( + 'desc' => + array ( + 0 => 'SF3 Archive', + 1 => 'SF3: Simple File Format Family', + ), + 'e' => + array ( + 0 => 'ar.sf3', + 1 => 'sf3', + ), + ), + 'application/x.sf3-log' => + array ( + 'desc' => + array ( + 0 => 'SF3 Log File', + 1 => 'SF3: Simple File Format Family', + ), + 'e' => + array ( + 0 => 'log.sf3', + 1 => 'sf3', + ), + ), + 'application/x.sf3-table' => + array ( + 'desc' => + array ( + 0 => 'SF3 Table', + 1 => 'SF3: Simple File Format Family', + ), + 'e' => + array ( + 0 => 'tab.sf3', + 1 => 'sf3', + ), + ), + 'application/x.sf3-text' => + array ( + 'desc' => + array ( + 0 => 'SF3 Rich Text', + 1 => 'SF3: Simple File Format Family', + ), + 'e' => + array ( + 0 => 'txt.sf3', + 1 => 'sf3', + ), + ), 'application/xaml+xml' => array ( 'e' => @@ -10240,6 +10330,19 @@ public function getFileName(): string 0 => 'xmf', ), ), + 'audio/x.sf3' => + array ( + 'desc' => + array ( + 0 => 'SF3 Audio', + 1 => 'SF3: Simple File Format Family', + ), + 'e' => + array ( + 0 => 'au.sf3', + 1 => 'sf3', + ), + ), 'audio/xm' => array ( 'e' => @@ -11809,6 +11912,32 @@ public function getFileName(): string 0 => 'xwd', ), ), + 'image/x.sf3' => + array ( + 'desc' => + array ( + 0 => 'SF3 Image', + 1 => 'SF3: Simple File Format Family', + ), + 'e' => + array ( + 0 => 'img.sf3', + 1 => 'sf3', + ), + ), + 'image/x.sf3-vector' => + array ( + 'desc' => + array ( + 0 => 'SF3 Vector Graphic', + 1 => 'SF3: Simple File Format Family', + ), + 'e' => + array ( + 0 => 'vec.sf3', + 1 => 'sf3', + ), + ), 'message/rfc822' => array ( 'desc' => @@ -11987,6 +12116,32 @@ public function getFileName(): string 2 => 'vrm', ), ), + 'model/x.sf3' => + array ( + 'desc' => + array ( + 0 => 'SF3 3D Model', + 1 => 'SF3: Simple File Format Family', + ), + 'e' => + array ( + 0 => 'mod.sf3', + 1 => 'sf3', + ), + ), + 'model/x.sf3-physics' => + array ( + 'desc' => + array ( + 0 => 'SF3 Physics Model', + 1 => 'SF3: Simple File Format Family', + ), + 'e' => + array ( + 0 => 'phys.sf3', + 1 => 'sf3', + ), + ), 'model/x3d+binary' => array ( 'e' => @@ -13282,6 +13437,28 @@ public function getFileName(): string 0 => 'reg', ), ), + 'text/x-ms-visualstudio.project' => + array ( + 'desc' => + array ( + 0 => 'Visual Studio Project', + ), + 'e' => + array ( + 0 => 'dsp', + ), + ), + 'text/x-ms-visualstudio.workspace' => + array ( + 'desc' => + array ( + 0 => 'Visual Studio Workspace', + ), + 'e' => + array ( + 0 => 'dsw', + ), + ), 'text/x-mup' => array ( 'desc' => @@ -14906,6 +15083,13 @@ public function getFileName(): string 0 => 'application/x-alz', ), ), + 'amf' => + array ( + 't' => + array ( + 0 => 'application/x-amf', + ), + ), 'ami' => array ( 't' => @@ -15023,6 +15207,7 @@ public function getFileName(): string 't' => array ( 0 => 'application/vnd.android.package-archive', + 1 => 'application/x-alpine-package-keeper-package', ), ), 'apng' => @@ -15089,6 +15274,13 @@ public function getFileName(): string 0 => 'application/x-archive', ), ), + 'ar.sf3' => + array ( + 't' => + array ( + 0 => 'application/x.sf3-archive', + ), + ), 'arc' => array ( 't' => @@ -15233,6 +15425,13 @@ public function getFileName(): string 0 => 'audio/basic', ), ), + 'au.sf3' => + array ( + 't' => + array ( + 0 => 'audio/x.sf3', + ), + ), 'automount' => array ( 't' => @@ -16768,6 +16967,13 @@ public function getFileName(): string 0 => 'text/x-dsl', ), ), + 'dsp' => + array ( + 't' => + array ( + 0 => 'text/x-ms-visualstudio.project', + ), + ), 'dssc' => array ( 't' => @@ -16775,6 +16981,13 @@ public function getFileName(): string 0 => 'application/dssc+der', ), ), + 'dsw' => + array ( + 't' => + array ( + 0 => 'text/x-ms-visualstudio.workspace', + ), + ), 'dtb' => array ( 't' => @@ -18294,6 +18507,13 @@ public function getFileName(): string 0 => 'application/vnd.hal+xml', ), ), + 'har' => + array ( + 't' => + array ( + 0 => 'application/har+json', + ), + ), 'hbci' => array ( 't' => @@ -18681,6 +18901,13 @@ public function getFileName(): string 0 => 'application/vnd.efi.img', ), ), + 'img.sf3' => + array ( + 't' => + array ( + 0 => 'image/x.sf3', + ), + ), 'img.xz' => array ( 't' => @@ -19565,6 +19792,13 @@ public function getFileName(): string 1 => 'text/x-log', ), ), + 'log.sf3' => + array ( + 't' => + array ( + 0 => 'application/x.sf3-log', + ), + ), 'lostxml' => array ( 't' => @@ -20329,6 +20563,13 @@ public function getFileName(): string 1 => 'audio/x-mod', ), ), + 'mod.sf3' => + array ( + 't' => + array ( + 0 => 'model/x.sf3', + ), + ), 'mods' => array ( 't' => @@ -21890,6 +22131,13 @@ public function getFileName(): string 0 => 'application/x-php', ), ), + 'phys.sf3' => + array ( + 't' => + array ( + 0 => 'model/x.sf3-physics', + ), + ), 'pic' => array ( 't' => @@ -23360,6 +23608,21 @@ public function getFileName(): string 0 => 'application/set-registration-initiation', ), ), + 'sf3' => + array ( + 't' => + array ( + 0 => 'application/x.sf3-archive', + 1 => 'audio/x.sf3', + 2 => 'image/x.sf3', + 3 => 'application/x.sf3-log', + 4 => 'model/x.sf3', + 5 => 'model/x.sf3-physics', + 6 => 'application/x.sf3-table', + 7 => 'application/x.sf3-text', + 8 => 'image/x.sf3-vector', + ), + ), 'sfc' => array ( 't' => @@ -24299,6 +24562,13 @@ public function getFileName(): string 0 => 'application/x-t3vm-image', ), ), + 'tab.sf3' => + array ( + 't' => + array ( + 0 => 'application/x.sf3-table', + ), + ), 'taglet' => array ( 't' => @@ -24843,6 +25113,13 @@ public function getFileName(): string 0 => 'text/plain', ), ), + 'txt.sf3' => + array ( + 't' => + array ( + 0 => 'application/x.sf3-text', + ), + ), 'txz' => array ( 't' => @@ -25342,6 +25619,13 @@ public function getFileName(): string 0 => 'application/x-vdi-disk', ), ), + 'vec.sf3' => + array ( + 't' => + array ( + 0 => 'image/x.sf3-vector', + ), + ), 'vhd' => array ( 't' => @@ -28724,6 +29008,13 @@ public function getFileName(): string 0 => 'text/x-gettext-translation-template', ), ), + 'text/x-ruby' => + array ( + 't' => + array ( + 0 => 'application/x-ruby', + ), + ), 'text/x-sh' => array ( 't' => From 1fff51aa3c8df9ba4c2499d0cd85376c300c8c4e Mon Sep 17 00:00:00 2001 From: mondrake Date: Sun, 21 Sep 2025 14:34:19 +0200 Subject: [PATCH 2/6] fix --- phpstan.neon.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index d465524f..5fb9e8f0 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -7,7 +7,7 @@ parameters: typeAliases: GenericMap: """ - array,string>>>> + non-empty-array,string>>>> """ MimeMap: """ array{ From 39aedc746f31ebd2d66115c73503b355174eb15a Mon Sep 17 00:00:00 2001 From: mondrake Date: Sun, 21 Sep 2025 14:35:47 +0200 Subject: [PATCH 3/6] fix --- phpstan.neon.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 5fb9e8f0..d465524f 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -7,7 +7,7 @@ parameters: typeAliases: GenericMap: """ - non-empty-array,string>>>> + array,string>>>> """ MimeMap: """ array{ From 9e01d3bc653803484aa63278069e4d8e0f37de58 Mon Sep 17 00:00:00 2001 From: mondrake Date: Sun, 21 Sep 2025 14:43:54 +0200 Subject: [PATCH 4/6] ignore phpstan error --- src/Map/BaseMap.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Map/BaseMap.php b/src/Map/BaseMap.php index 401826a8..b3fd8d32 100644 --- a/src/Map/BaseMap.php +++ b/src/Map/BaseMap.php @@ -75,6 +75,7 @@ public function getMapArray(): array public function sort(): MapInterface { foreach (array_keys(static::$map) as $k) { + // @phpstan-ignore assign.propertyType ksort(static::$map[$k]); foreach (static::$map[$k] as &$sub) { ksort($sub); From 0362e1509127722becea36f8d9a3bfd6d9807924 Mon Sep 17 00:00:00 2001 From: mondrake Date: Sun, 21 Sep 2025 14:43:57 +0200 Subject: [PATCH 5/6] fix --- composer.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4694b915..14db89d7 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,9 @@ "symfony/filesystem": ">=6.4", "symfony/console": ">=6.4", "symfony/var-dumper": ">=6.4", - "symfony/yaml": ">=6.4" + "symfony/yaml": ">=6.4", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-phpunit": "^2.0" }, "autoload": { "psr-4": { From 2cd6e81f6bbf1f60996bdfefa8d114fecfbc3ceb Mon Sep 17 00:00:00 2001 From: mondrake Date: Sun, 21 Sep 2025 14:45:51 +0200 Subject: [PATCH 6/6] fix --- composer.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 14db89d7..4694b915 100644 --- a/composer.json +++ b/composer.json @@ -15,9 +15,7 @@ "symfony/filesystem": ">=6.4", "symfony/console": ">=6.4", "symfony/var-dumper": ">=6.4", - "symfony/yaml": ">=6.4", - "phpstan/phpstan": "^2.1", - "phpstan/phpstan-phpunit": "^2.0" + "symfony/yaml": ">=6.4" }, "autoload": { "psr-4": {