Update composer dependencies
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 5 May 2023 08:25:49 +0000 (10:25 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 5 May 2023 08:25:49 +0000 (10:25 +0200)
39 files changed:
wcfsetup/install/files/lib/system/api/composer.json
wcfsetup/install/files/lib/system/api/composer.lock
wcfsetup/install/files/lib/system/api/composer/autoload_classmap.php
wcfsetup/install/files/lib/system/api/composer/autoload_files.php
wcfsetup/install/files/lib/system/api/composer/autoload_static.php
wcfsetup/install/files/lib/system/api/composer/installed.json
wcfsetup/install/files/lib/system/api/composer/installed.php
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/composer.json
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/CallbackStream.php
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/MessageTrait.php
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/PhpInputStream.php [deleted file]
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/RelativeStream.php
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/Request.php
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/RequestTrait.php
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/Response.php
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/ServerRequest.php
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/ServerRequestFactory.php
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/Stream.php
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/StreamFactory.php
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/UploadedFile.php
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/Uri.php
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/create_uploaded_file.legacy.php [deleted file]
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/marshal_headers_from_sapi.legacy.php [deleted file]
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/marshal_headers_from_sapi.php
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/marshal_method_from_sapi.legacy.php [deleted file]
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/marshal_protocol_version_from_sapi.legacy.php [deleted file]
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/marshal_uri_from_sapi.legacy.php [deleted file]
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/marshal_uri_from_sapi.php [deleted file]
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/normalize_server.legacy.php [deleted file]
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/normalize_uploaded_files.legacy.php [deleted file]
wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/parse_cookie_header.legacy.php [deleted file]
wcfsetup/install/files/lib/system/api/psr/http-message/composer.json
wcfsetup/install/files/lib/system/api/psr/http-message/src/MessageInterface.php
wcfsetup/install/files/lib/system/api/psr/http-message/src/RequestInterface.php
wcfsetup/install/files/lib/system/api/psr/http-message/src/ResponseInterface.php
wcfsetup/install/files/lib/system/api/psr/http-message/src/ServerRequestInterface.php
wcfsetup/install/files/lib/system/api/psr/http-message/src/StreamInterface.php
wcfsetup/install/files/lib/system/api/psr/http-message/src/UploadedFileInterface.php
wcfsetup/install/files/lib/system/api/psr/http-message/src/UriInterface.php

index 9e54e06bb520f0cabe929c8bc934e67e9260db7d..438aa9e32b82f2afa68dc8d6ce52accf91b49390 100644 (file)
         "ezyang/htmlpurifier": "^4.16",
         "guzzlehttp/guzzle": "^7.5.1",
         "guzzlehttp/psr7": "^2.5.0",
-        "laminas/laminas-diactoros": "^2.25.2",
+        "laminas/laminas-diactoros": "^3.0.0",
         "laminas/laminas-httphandlerrunner": "^2.6",
         "laminas/laminas-progressbar": "^2.11",
         "paragonie/constant_time_encoding": "^2.6.3",
         "pelago/emogrifier": "^7.0.0",
         "psr/clock": "^1.0",
         "psr/event-dispatcher": "^1.0",
-        "psr/http-message": "^1.1.0",
+        "psr/http-message": "^2.0",
         "psr/http-server-handler": "^1.0.2",
         "psr/http-server-middleware": "^1.0.2",
         "psr/log": "^3.0",
index 92a68203253d0c9d96cfe9d2eb2ced90e61cebbd..4efd1db3aad66db5c59a40fb3b0668e3b28a95e6 100644 (file)
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "2983948012af211bf635948ccf965b06",
+    "content-hash": "84250bc88acacd285d9605a8b2ef00c7",
     "packages": [
         {
             "name": "cuyz/valinor",
         },
         {
             "name": "laminas/laminas-diactoros",
-            "version": "2.25.2",
+            "version": "3.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/laminas/laminas-diactoros.git",
-                "reference": "9f3f4bf5b99c9538b6f1dbcc20f6fec357914f9e"
+                "reference": "2515f4134258b1b418c23cb86606b8a09dd01aea"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/9f3f4bf5b99c9538b6f1dbcc20f6fec357914f9e",
-                "reference": "9f3f4bf5b99c9538b6f1dbcc20f6fec357914f9e",
+                "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/2515f4134258b1b418c23cb86606b8a09dd01aea",
+                "reference": "2515f4134258b1b418c23cb86606b8a09dd01aea",
                 "shasum": ""
             },
             "require": {
                 "php": "~8.0.0 || ~8.1.0 || ~8.2.0",
-                "psr/http-factory": "^1.0",
-                "psr/http-message": "^1.1"
-            },
-            "conflict": {
-                "zendframework/zend-diactoros": "*"
+                "psr/http-factory": "^1.0.2",
+                "psr/http-message": "^1.1 || ^2.0"
             },
             "provide": {
-                "psr/http-factory-implementation": "1.0",
-                "psr/http-message-implementation": "1.0"
+                "psr/http-factory-implementation": "^1.1 || ^2.0",
+                "psr/http-message-implementation": "^1.1 || ^2.0"
             },
             "require-dev": {
                 "ext-curl": "*",
                 "ext-gd": "*",
                 "ext-libxml": "*",
                 "http-interop/http-factory-tests": "^0.9.0",
-                "laminas/laminas-coding-standard": "^2.5",
-                "php-http/psr7-integration-tests": "^1.2",
+                "laminas/laminas-coding-standard": "~2.5.0",
+                "php-http/psr7-integration-tests": "^1.3",
                 "phpunit/phpunit": "^9.5.28",
                 "psalm/plugin-phpunit": "^0.18.4",
-                "vimeo/psalm": "^5.6"
+                "vimeo/psalm": "^5.9"
             },
             "type": "library",
             "extra": {
                     "src/functions/marshal_headers_from_sapi.php",
                     "src/functions/marshal_method_from_sapi.php",
                     "src/functions/marshal_protocol_version_from_sapi.php",
-                    "src/functions/marshal_uri_from_sapi.php",
                     "src/functions/normalize_server.php",
                     "src/functions/normalize_uploaded_files.php",
-                    "src/functions/parse_cookie_header.php",
-                    "src/functions/create_uploaded_file.legacy.php",
-                    "src/functions/marshal_headers_from_sapi.legacy.php",
-                    "src/functions/marshal_method_from_sapi.legacy.php",
-                    "src/functions/marshal_protocol_version_from_sapi.legacy.php",
-                    "src/functions/marshal_uri_from_sapi.legacy.php",
-                    "src/functions/normalize_server.legacy.php",
-                    "src/functions/normalize_uploaded_files.legacy.php",
-                    "src/functions/parse_cookie_header.legacy.php"
+                    "src/functions/parse_cookie_header.php"
                 ],
                 "psr-4": {
                     "Laminas\\Diactoros\\": "src/"
                     "type": "community_bridge"
                 }
             ],
-            "time": "2023-04-17T15:44:17+00:00"
+            "time": "2023-05-04T21:18:23+00:00"
         },
         {
             "name": "laminas/laminas-httphandlerrunner",
         },
         {
             "name": "psr/http-message",
-            "version": "1.1",
+            "version": "2.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/php-fig/http-message.git",
-                "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
+                "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
-                "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
+                "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
+                "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
                 "shasum": ""
             },
             "require": {
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.1.x-dev"
+                    "dev-master": "2.0.x-dev"
                 }
             },
             "autoload": {
             "authors": [
                 {
                     "name": "PHP-FIG",
-                    "homepage": "http://www.php-fig.org/"
+                    "homepage": "https://www.php-fig.org/"
                 }
             ],
             "description": "Common interface for HTTP messages",
                 "response"
             ],
             "support": {
-                "source": "https://github.com/php-fig/http-message/tree/1.1"
+                "source": "https://github.com/php-fig/http-message/tree/2.0"
             },
-            "time": "2023-04-04T09:50:52+00:00"
+            "time": "2023-04-04T09:54:51+00:00"
         },
         {
             "name": "psr/http-server-handler",
index 3e0ffbb38ef868e2212f9b8db2166f6ea89ca4b2..341fb46d746cdbccca9b3c868fb0afe3f225d2e9 100644 (file)
@@ -682,7 +682,6 @@ return array(
     'Laminas\\Diactoros\\HeaderSecurity' => $vendorDir . '/laminas/laminas-diactoros/src/HeaderSecurity.php',
     'Laminas\\Diactoros\\MessageTrait' => $vendorDir . '/laminas/laminas-diactoros/src/MessageTrait.php',
     'Laminas\\Diactoros\\Module' => $vendorDir . '/laminas/laminas-diactoros/src/Module.php',
-    'Laminas\\Diactoros\\PhpInputStream' => $vendorDir . '/laminas/laminas-diactoros/src/PhpInputStream.php',
     'Laminas\\Diactoros\\RelativeStream' => $vendorDir . '/laminas/laminas-diactoros/src/RelativeStream.php',
     'Laminas\\Diactoros\\Request' => $vendorDir . '/laminas/laminas-diactoros/src/Request.php',
     'Laminas\\Diactoros\\RequestFactory' => $vendorDir . '/laminas/laminas-diactoros/src/RequestFactory.php',
index a3cd434e5f76597631f837f2d24e87e9b64518e5..e716c0351799b80dca01b1da26af0a297608d784 100644 (file)
@@ -15,17 +15,8 @@ return array(
     'da94ac5d3ca7d2dbab84ce561ce72bfd' => $vendorDir . '/laminas/laminas-diactoros/src/functions/marshal_headers_from_sapi.php',
     '3d97c8dcdfba8cb85d3b34f116bb248b' => $vendorDir . '/laminas/laminas-diactoros/src/functions/marshal_method_from_sapi.php',
     'e6f3bc6883e449ab367280b34158c05b' => $vendorDir . '/laminas/laminas-diactoros/src/functions/marshal_protocol_version_from_sapi.php',
-    'd59fbae42019aedf227094ac49a46f50' => $vendorDir . '/laminas/laminas-diactoros/src/functions/marshal_uri_from_sapi.php',
     'de95e0ac670b27c84ef8c5ac41fc1b34' => $vendorDir . '/laminas/laminas-diactoros/src/functions/normalize_server.php',
     'b6c2870932b0250c10334a86dcb33c7f' => $vendorDir . '/laminas/laminas-diactoros/src/functions/normalize_uploaded_files.php',
     'd02cf21124526632320d6f20b1bbf905' => $vendorDir . '/laminas/laminas-diactoros/src/functions/parse_cookie_header.php',
-    'd919fc9d5ad52cfb7f322f7fe36458ab' => $vendorDir . '/laminas/laminas-diactoros/src/functions/create_uploaded_file.legacy.php',
-    'e397f74f8af3b1e56166a6e99f216ee7' => $vendorDir . '/laminas/laminas-diactoros/src/functions/marshal_headers_from_sapi.legacy.php',
-    'd154b49fab8e4da34fb553a2d644918c' => $vendorDir . '/laminas/laminas-diactoros/src/functions/marshal_method_from_sapi.legacy.php',
-    '9d3db23ca418094bcf0b641a0c9559ed' => $vendorDir . '/laminas/laminas-diactoros/src/functions/marshal_protocol_version_from_sapi.legacy.php',
-    'b0b88a3b89caae681462c58ff19a7059' => $vendorDir . '/laminas/laminas-diactoros/src/functions/marshal_uri_from_sapi.legacy.php',
-    'cc8e14526dc240491e17a838cb78508c' => $vendorDir . '/laminas/laminas-diactoros/src/functions/normalize_server.legacy.php',
-    '786bf90caabc9e09b6ad4cc5ca8f0e30' => $vendorDir . '/laminas/laminas-diactoros/src/functions/normalize_uploaded_files.legacy.php',
-    '751a5a3f463e4be759be31748b61737c' => $vendorDir . '/laminas/laminas-diactoros/src/functions/parse_cookie_header.legacy.php',
     '5897ea0ac4cccf14d323035e65887801' => $vendorDir . '/symfony/polyfill-php82/bootstrap.php',
 );
index 1b52cf09eaed8838b19a36c43ed780a902e8d16c..573489c0c533ffafedd1735b7b1806a06155ebe0 100644 (file)
@@ -16,18 +16,9 @@ class ComposerStaticInita1f5f7c74275d47a45049a2936db1d0d
         'da94ac5d3ca7d2dbab84ce561ce72bfd' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/marshal_headers_from_sapi.php',
         '3d97c8dcdfba8cb85d3b34f116bb248b' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/marshal_method_from_sapi.php',
         'e6f3bc6883e449ab367280b34158c05b' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/marshal_protocol_version_from_sapi.php',
-        'd59fbae42019aedf227094ac49a46f50' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/marshal_uri_from_sapi.php',
         'de95e0ac670b27c84ef8c5ac41fc1b34' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/normalize_server.php',
         'b6c2870932b0250c10334a86dcb33c7f' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/normalize_uploaded_files.php',
         'd02cf21124526632320d6f20b1bbf905' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/parse_cookie_header.php',
-        'd919fc9d5ad52cfb7f322f7fe36458ab' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/create_uploaded_file.legacy.php',
-        'e397f74f8af3b1e56166a6e99f216ee7' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/marshal_headers_from_sapi.legacy.php',
-        'd154b49fab8e4da34fb553a2d644918c' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/marshal_method_from_sapi.legacy.php',
-        '9d3db23ca418094bcf0b641a0c9559ed' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/marshal_protocol_version_from_sapi.legacy.php',
-        'b0b88a3b89caae681462c58ff19a7059' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/marshal_uri_from_sapi.legacy.php',
-        'cc8e14526dc240491e17a838cb78508c' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/normalize_server.legacy.php',
-        '786bf90caabc9e09b6ad4cc5ca8f0e30' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/normalize_uploaded_files.legacy.php',
-        '751a5a3f463e4be759be31748b61737c' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/functions/parse_cookie_header.legacy.php',
         '5897ea0ac4cccf14d323035e65887801' => __DIR__ . '/..' . '/symfony/polyfill-php82/bootstrap.php',
     );
 
@@ -874,7 +865,6 @@ class ComposerStaticInita1f5f7c74275d47a45049a2936db1d0d
         'Laminas\\Diactoros\\HeaderSecurity' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/HeaderSecurity.php',
         'Laminas\\Diactoros\\MessageTrait' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/MessageTrait.php',
         'Laminas\\Diactoros\\Module' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/Module.php',
-        'Laminas\\Diactoros\\PhpInputStream' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/PhpInputStream.php',
         'Laminas\\Diactoros\\RelativeStream' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/RelativeStream.php',
         'Laminas\\Diactoros\\Request' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/Request.php',
         'Laminas\\Diactoros\\RequestFactory' => __DIR__ . '/..' . '/laminas/laminas-diactoros/src/RequestFactory.php',
index 41c5e11c1597e125119241af4322ed0cfa465225..e778d82f4f85e99b13f32400484dd9591383838a 100644 (file)
         },
         {
             "name": "laminas/laminas-diactoros",
-            "version": "2.25.2",
-            "version_normalized": "2.25.2.0",
+            "version": "3.0.0",
+            "version_normalized": "3.0.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/laminas/laminas-diactoros.git",
-                "reference": "9f3f4bf5b99c9538b6f1dbcc20f6fec357914f9e"
+                "reference": "2515f4134258b1b418c23cb86606b8a09dd01aea"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/9f3f4bf5b99c9538b6f1dbcc20f6fec357914f9e",
-                "reference": "9f3f4bf5b99c9538b6f1dbcc20f6fec357914f9e",
+                "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/2515f4134258b1b418c23cb86606b8a09dd01aea",
+                "reference": "2515f4134258b1b418c23cb86606b8a09dd01aea",
                 "shasum": ""
             },
             "require": {
                 "php": "~8.0.0 || ~8.1.0 || ~8.2.0",
-                "psr/http-factory": "^1.0",
-                "psr/http-message": "^1.1"
-            },
-            "conflict": {
-                "zendframework/zend-diactoros": "*"
+                "psr/http-factory": "^1.0.2",
+                "psr/http-message": "^1.1 || ^2.0"
             },
             "provide": {
-                "psr/http-factory-implementation": "1.0",
-                "psr/http-message-implementation": "1.0"
+                "psr/http-factory-implementation": "^1.1 || ^2.0",
+                "psr/http-message-implementation": "^1.1 || ^2.0"
             },
             "require-dev": {
                 "ext-curl": "*",
                 "ext-gd": "*",
                 "ext-libxml": "*",
                 "http-interop/http-factory-tests": "^0.9.0",
-                "laminas/laminas-coding-standard": "^2.5",
-                "php-http/psr7-integration-tests": "^1.2",
+                "laminas/laminas-coding-standard": "~2.5.0",
+                "php-http/psr7-integration-tests": "^1.3",
                 "phpunit/phpunit": "^9.5.28",
                 "psalm/plugin-phpunit": "^0.18.4",
-                "vimeo/psalm": "^5.6"
+                "vimeo/psalm": "^5.9"
             },
-            "time": "2023-04-17T15:44:17+00:00",
+            "time": "2023-05-04T21:18:23+00:00",
             "type": "library",
             "extra": {
                 "laminas": {
                     "src/functions/marshal_headers_from_sapi.php",
                     "src/functions/marshal_method_from_sapi.php",
                     "src/functions/marshal_protocol_version_from_sapi.php",
-                    "src/functions/marshal_uri_from_sapi.php",
                     "src/functions/normalize_server.php",
                     "src/functions/normalize_uploaded_files.php",
-                    "src/functions/parse_cookie_header.php",
-                    "src/functions/create_uploaded_file.legacy.php",
-                    "src/functions/marshal_headers_from_sapi.legacy.php",
-                    "src/functions/marshal_method_from_sapi.legacy.php",
-                    "src/functions/marshal_protocol_version_from_sapi.legacy.php",
-                    "src/functions/marshal_uri_from_sapi.legacy.php",
-                    "src/functions/normalize_server.legacy.php",
-                    "src/functions/normalize_uploaded_files.legacy.php",
-                    "src/functions/parse_cookie_header.legacy.php"
+                    "src/functions/parse_cookie_header.php"
                 ],
                 "psr-4": {
                     "Laminas\\Diactoros\\": "src/"
         },
         {
             "name": "psr/http-message",
-            "version": "1.1",
-            "version_normalized": "1.1.0.0",
+            "version": "2.0",
+            "version_normalized": "2.0.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/php-fig/http-message.git",
-                "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
+                "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
-                "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
+                "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
+                "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
                 "shasum": ""
             },
             "require": {
                 "php": "^7.2 || ^8.0"
             },
-            "time": "2023-04-04T09:50:52+00:00",
+            "time": "2023-04-04T09:54:51+00:00",
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.1.x-dev"
+                    "dev-master": "2.0.x-dev"
                 }
             },
             "installation-source": "dist",
             "authors": [
                 {
                     "name": "PHP-FIG",
-                    "homepage": "http://www.php-fig.org/"
+                    "homepage": "https://www.php-fig.org/"
                 }
             ],
             "description": "Common interface for HTTP messages",
                 "response"
             ],
             "support": {
-                "source": "https://github.com/php-fig/http-message/tree/1.1"
+                "source": "https://github.com/php-fig/http-message/tree/2.0"
             },
             "install-path": "../psr/http-message"
         },
index d4d3e92030b931263f28746cad28e4c28eb35ca0..2c59e33b81ec6004a2cac29aeede0d929327903d 100644 (file)
@@ -83,9 +83,9 @@
             'dev_requirement' => false,
         ),
         'laminas/laminas-diactoros' => array(
-            'pretty_version' => '2.25.2',
-            'version' => '2.25.2.0',
-            'reference' => '9f3f4bf5b99c9538b6f1dbcc20f6fec357914f9e',
+            'pretty_version' => '3.0.0',
+            'version' => '3.0.0.0',
+            'reference' => '2515f4134258b1b418c23cb86606b8a09dd01aea',
             'type' => 'library',
             'install_path' => __DIR__ . '/../laminas/laminas-diactoros',
             'aliases' => array(),
             'dev_requirement' => false,
             'provided' => array(
                 0 => '1.0',
+                1 => '^1.1 || ^2.0',
             ),
         ),
         'psr/http-message' => array(
-            'pretty_version' => '1.1',
-            'version' => '1.1.0.0',
-            'reference' => 'cb6ce4845ce34a8ad9e68117c10ee90a29919eba',
+            'pretty_version' => '2.0',
+            'version' => '2.0.0.0',
+            'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71',
             'type' => 'library',
             'install_path' => __DIR__ . '/../psr/http-message',
             'aliases' => array(),
             'dev_requirement' => false,
             'provided' => array(
                 0 => '1.0',
+                1 => '^1.1 || ^2.0',
             ),
         ),
         'psr/http-server-handler' => array(
index c141b3843865a91c321f308c98f87573059c8c3b..371b97de8efea142351ceb2802236d2baf0de6be 100644 (file)
@@ -35,8 +35,8 @@
     },
     "require": {
         "php": "~8.0.0 || ~8.1.0 || ~8.2.0",
-        "psr/http-factory": "^1.0",
-        "psr/http-message": "^1.1"
+        "psr/http-factory": "^1.0.2",
+        "psr/http-message": "^1.1 || ^2.0"
     },
     "require-dev": {
         "ext-curl": "*",
         "ext-gd": "*",
         "ext-libxml": "*",
         "http-interop/http-factory-tests": "^0.9.0",
-        "laminas/laminas-coding-standard": "^2.5",
-        "php-http/psr7-integration-tests": "^1.2",
+        "laminas/laminas-coding-standard": "~2.5.0",
+        "php-http/psr7-integration-tests": "^1.3",
         "phpunit/phpunit": "^9.5.28",
         "psalm/plugin-phpunit": "^0.18.4",
-        "vimeo/psalm": "^5.6"
+        "vimeo/psalm": "^5.9"
     },
     "provide": {
-        "psr/http-factory-implementation": "1.0",
-        "psr/http-message-implementation": "1.0"
-    },
-    "conflict": {
-        "zendframework/zend-diactoros": "*"
+        "psr/http-factory-implementation": "^1.1 || ^2.0",
+        "psr/http-message-implementation": "^1.1 || ^2.0"
     },
     "autoload": {
         "files": [
             "src/functions/marshal_headers_from_sapi.php",
             "src/functions/marshal_method_from_sapi.php",
             "src/functions/marshal_protocol_version_from_sapi.php",
-            "src/functions/marshal_uri_from_sapi.php",
             "src/functions/normalize_server.php",
             "src/functions/normalize_uploaded_files.php",
-            "src/functions/parse_cookie_header.php",
-            "src/functions/create_uploaded_file.legacy.php",
-            "src/functions/marshal_headers_from_sapi.legacy.php",
-            "src/functions/marshal_method_from_sapi.legacy.php",
-            "src/functions/marshal_protocol_version_from_sapi.legacy.php",
-            "src/functions/marshal_uri_from_sapi.legacy.php",
-            "src/functions/normalize_server.legacy.php",
-            "src/functions/normalize_uploaded_files.legacy.php",
-            "src/functions/parse_cookie_header.legacy.php"
+            "src/functions/parse_cookie_header.php"
         ],
         "psr-4": {
             "Laminas\\Diactoros\\": "src/"
index cf344a15b9ef4b8f035242d7fcf9f5699eb7b41d..11e10df15a4bf04768fbe29205f4c61357ac8425 100644 (file)
@@ -97,12 +97,8 @@ class CallbackStream implements StreamInterface, Stringable
 
     /**
      * {@inheritdoc}
-     *
-     * @param int $offset
-     * @param int $whence
-     * @return void
      */
-    public function seek($offset, $whence = SEEK_SET)
+    public function seek(int $offset, int $whence = SEEK_SET): void
     {
         throw Exception\UnseekableStreamException::forCallbackStream();
     }
@@ -126,7 +122,7 @@ class CallbackStream implements StreamInterface, Stringable
     /**
      * {@inheritdoc}
      */
-    public function write($string): void
+    public function write(string $string): int
     {
         throw Exception\UnwritableStreamException::forCallbackStream();
     }
@@ -142,7 +138,7 @@ class CallbackStream implements StreamInterface, Stringable
     /**
      * {@inheritdoc}
      */
-    public function read($length): string
+    public function read(int $length): string
     {
         throw Exception\UnreadableStreamException::forCallbackStream();
     }
@@ -160,7 +156,7 @@ class CallbackStream implements StreamInterface, Stringable
     /**
      * {@inheritdoc}
      */
-    public function getMetadata($key = null)
+    public function getMetadata(?string $key = null)
     {
         $metadata = [
             'eof'         => $this->eof(),
index 695b942eb1d51750b492a48cc57f3c50810ea798..e95d072a6458c508b9dc6b016e92bab9e1b56dcf 100644 (file)
@@ -10,10 +10,8 @@ use Psr\Http\Message\StreamInterface;
 use function array_map;
 use function array_merge;
 use function array_values;
-use function gettype;
 use function implode;
 use function is_array;
-use function is_object;
 use function is_resource;
 use function is_string;
 use function preg_match;
@@ -76,7 +74,7 @@ trait MessageTrait
      * @param string $version HTTP protocol version
      * @return static
      */
-    public function withProtocolVersion($version): MessageInterface
+    public function withProtocolVersion(string $version): MessageInterface
     {
         $this->validateProtocolVersion($version);
         $new           = clone $this;
@@ -119,7 +117,7 @@ trait MessageTrait
      *     name using a case-insensitive string comparison. Returns false if
      *     no matching header name is found in the message.
      */
-    public function hasHeader($header): bool
+    public function hasHeader(string $header): bool
     {
         return isset($this->headerNames[strtolower($header)]);
     }
@@ -138,7 +136,7 @@ trait MessageTrait
      *    header. If the header does not appear in the message, this method MUST
      *    return an empty array.
      */
-    public function getHeader($header): array
+    public function getHeader(string $header): array
     {
         if (! $this->hasHeader($header)) {
             return [];
@@ -168,7 +166,7 @@ trait MessageTrait
      *    concatenated together using a comma. If the header does not appear in
      *    the message, this method MUST return an empty string.
      */
-    public function getHeaderLine($name): string
+    public function getHeaderLine(string $name): string
     {
         $value = $this->getHeader($name);
         if (empty($value)) {
@@ -194,7 +192,7 @@ trait MessageTrait
      * @return static
      * @throws Exception\InvalidArgumentException For invalid header names or values.
      */
-    public function withHeader($name, $value): MessageInterface
+    public function withHeader(string $name, $value): MessageInterface
     {
         $this->assertHeader($name);
 
@@ -230,7 +228,7 @@ trait MessageTrait
      * @return static
      * @throws Exception\InvalidArgumentException For invalid header names or values.
      */
-    public function withAddedHeader($name, $value): MessageInterface
+    public function withAddedHeader(string $name, $value): MessageInterface
     {
         $this->assertHeader($name);
 
@@ -258,9 +256,9 @@ trait MessageTrait
      * @param string $name Case-insensitive header field name to remove.
      * @return static
      */
-    public function withoutHeader($name): MessageInterface
+    public function withoutHeader(string $name): MessageInterface
     {
-        if (! is_string($name) || $name === '' || ! $this->hasHeader($name)) {
+        if ($name === '' || ! $this->hasHeader($name)) {
             return clone $this;
         }
 
@@ -347,22 +345,15 @@ trait MessageTrait
     /**
      * Validate the HTTP protocol version
      *
-     * @param string $version
      * @throws Exception\InvalidArgumentException On invalid HTTP protocol version.
      */
-    private function validateProtocolVersion($version): void
+    private function validateProtocolVersion(string $version): void
     {
         if (empty($version)) {
             throw new Exception\InvalidArgumentException(
                 'HTTP protocol version can not be empty'
             );
         }
-        if (! is_string($version)) {
-            throw new Exception\InvalidArgumentException(sprintf(
-                'Unsupported HTTP protocol version; must be a string, received %s',
-                is_object($version) ? $version::class : gettype($version)
-            ));
-        }
 
         // HTTP/1 uses a "<major>.<minor>" numbering scheme to indicate
         // versions of the protocol, while HTTP/2 does not.
diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/PhpInputStream.php b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/PhpInputStream.php
deleted file mode 100644 (file)
index cef45d6..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Laminas\Diactoros;
-
-use Stringable;
-
-use function stream_get_contents;
-
-/**
- * Caching version of php://input
- */
-class PhpInputStream extends Stream implements Stringable
-{
-    private string $cache = '';
-
-    private bool $reachedEof = false;
-
-    /**
-     * @param  string|resource $stream
-     */
-    public function __construct($stream = 'php://input')
-    {
-        parent::__construct($stream, 'r');
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function __toString(): string
-    {
-        if ($this->reachedEof) {
-            return $this->cache;
-        }
-
-        $this->getContents();
-        return $this->cache;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function isWritable(): bool
-    {
-        return false;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function read($length): string
-    {
-        $content = parent::read($length);
-        if (! $this->reachedEof) {
-            $this->cache .= $content;
-        }
-
-        if ($this->eof()) {
-            $this->reachedEof = true;
-        }
-
-        return $content;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getContents($maxLength = -1): string
-    {
-        if ($this->reachedEof) {
-            return $this->cache;
-        }
-
-        $contents     = stream_get_contents($this->resource, $maxLength);
-        $this->cache .= $contents;
-
-        if ($maxLength === -1 || $this->eof()) {
-            $this->reachedEof = true;
-        }
-
-        return $contents;
-    }
-}
index 0c12833ef99e878037a7b7598b4693a25deb3b94..d82457a0674f2f9e24b81790cd1f60e10b29b95e 100644 (file)
@@ -86,7 +86,7 @@ final class RelativeStream implements StreamInterface, Stringable
     /**
      * {@inheritdoc}
      */
-    public function seek($offset, $whence = SEEK_SET): void
+    public function seek(int $offset, int $whence = SEEK_SET): void
     {
         if ($whence === SEEK_SET) {
             $this->decoratedStream->seek($offset + $this->offset, $whence);
@@ -114,7 +114,7 @@ final class RelativeStream implements StreamInterface, Stringable
     /**
      * {@inheritdoc}
      */
-    public function write($string): int
+    public function write(string $string): int
     {
         if ($this->tell() < 0) {
             throw new Exception\InvalidStreamPointerPositionException();
@@ -133,7 +133,7 @@ final class RelativeStream implements StreamInterface, Stringable
     /**
      * {@inheritdoc}
      */
-    public function read($length): string
+    public function read(int $length): string
     {
         if ($this->tell() < 0) {
             throw new Exception\InvalidStreamPointerPositionException();
@@ -155,7 +155,7 @@ final class RelativeStream implements StreamInterface, Stringable
     /**
      * {@inheritdoc}
      */
-    public function getMetadata($key = null)
+    public function getMetadata(?string $key = null)
     {
         return $this->decoratedStream->getMetadata($key);
     }
index 504581c201ef2d1b66b07164a53f887153fb0a86..84f5fd9ea25d3a3d4dc84a7eec994c4d4488d4a2 100644 (file)
@@ -52,7 +52,7 @@ class Request implements RequestInterface
     /**
      * {@inheritdoc}
      */
-    public function getHeader($name): array
+    public function getHeader(string $name): array
     {
         if (empty($name) || ! $this->hasHeader($name)) {
             if (
index 3194682e9f7210e0fed23d160f0bb62c5eaf0e96..4ce4478b0e23dd758b42325ac069510ce61e2338 100644 (file)
@@ -9,8 +9,6 @@ use Psr\Http\Message\StreamInterface;
 use Psr\Http\Message\UriInterface;
 
 use function array_keys;
-use function gettype;
-use function is_object;
 use function is_string;
 use function preg_match;
 use function sprintf;
@@ -89,23 +87,19 @@ trait RequestTrait
      *
      * Otherwise, it raises an exception.
      *
-     * @param null|string|UriInterface $uri
      * @throws Exception\InvalidArgumentException
      */
-    private function createUri($uri): UriInterface
+    private function createUri(null|string|UriInterface $uri): UriInterface
     {
         if ($uri instanceof UriInterface) {
             return $uri;
         }
+
         if (is_string($uri)) {
             return new Uri($uri);
         }
-        if ($uri === null) {
-            return new Uri();
-        }
-        throw new Exception\InvalidArgumentException(
-            'Invalid URI provided; must be null, a string, or a Psr\Http\Message\UriInterface instance'
-        );
+
+        return new Uri();
     }
 
     /**
@@ -155,11 +149,10 @@ trait RequestTrait
      * @link http://tools.ietf.org/html/rfc7230#section-2.7 (for the various
      *     request-target forms allowed in request messages)
      *
-     * @param string $requestTarget
      * @throws Exception\InvalidArgumentException If the request target is invalid.
      * @return static
      */
-    public function withRequestTarget($requestTarget): RequestInterface
+    public function withRequestTarget(string $requestTarget): RequestInterface
     {
         if (preg_match('#\s#', $requestTarget)) {
             throw new Exception\InvalidArgumentException(
@@ -197,7 +190,7 @@ trait RequestTrait
      * @throws Exception\InvalidArgumentException For invalid HTTP methods.
      * @return static
      */
-    public function withMethod($method): RequestInterface
+    public function withMethod(string $method): RequestInterface
     {
         $new = clone $this;
         $new->setMethod($method);
@@ -245,7 +238,7 @@ trait RequestTrait
      * @param bool $preserveHost Preserve the original state of the Host header.
      * @return static
      */
-    public function withUri(UriInterface $uri, $preserveHost = false): RequestInterface
+    public function withUri(UriInterface $uri, bool $preserveHost = false): RequestInterface
     {
         $new      = clone $this;
         $new->uri = $uri;
@@ -282,18 +275,10 @@ trait RequestTrait
     /**
      * Set and validate the HTTP method
      *
-     * @param string $method
      * @throws Exception\InvalidArgumentException On invalid HTTP method.
      */
-    private function setMethod($method): void
+    private function setMethod(string $method): void
     {
-        if (! is_string($method)) {
-            throw new Exception\InvalidArgumentException(sprintf(
-                'Unsupported HTTP method; must be a string, received %s',
-                is_object($method) ? $method::class : gettype($method)
-            ));
-        }
-
         if (! preg_match('/^[!#$%&\'*+.^_`\|~0-9a-z-]+$/i', $method)) {
             throw new Exception\InvalidArgumentException(sprintf(
                 'Unsupported HTTP method "%s" provided',
index 0fc353d727061aa1038ae378af1de677f2ce8414..a99625da6ac784429e59341930eec042707752e2 100644 (file)
@@ -7,12 +7,6 @@ namespace Laminas\Diactoros;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\StreamInterface;
 
-use function gettype;
-use function is_float;
-use function is_numeric;
-use function is_object;
-use function is_scalar;
-use function is_string;
 use function sprintf;
 
 /**
@@ -144,7 +138,7 @@ class Response implements ResponseInterface
     /**
      * {@inheritdoc}
      */
-    public function withStatus($code, $reasonPhrase = ''): Response
+    public function withStatus(int $code, string $reasonPhrase = ''): Response
     {
         $new = clone $this;
         $new->setStatusCode($code, $reasonPhrase);
@@ -154,38 +148,27 @@ class Response implements ResponseInterface
     /**
      * Set a valid status code.
      *
-     * @param int $code
-     * @param string $reasonPhrase
      * @throws Exception\InvalidArgumentException On an invalid status code.
      */
-    private function setStatusCode($code, $reasonPhrase = ''): void
+    private function setStatusCode(int $code, string $reasonPhrase = ''): void
     {
         if (
-            ! is_numeric($code)
-            || is_float($code)
-            || $code < static::MIN_STATUS_CODE_VALUE
+            $code < static::MIN_STATUS_CODE_VALUE
             || $code > static::MAX_STATUS_CODE_VALUE
         ) {
             throw new Exception\InvalidArgumentException(sprintf(
                 'Invalid status code "%s"; must be an integer between %d and %d, inclusive',
-                is_scalar($code) ? $code : gettype($code),
+                $code,
                 static::MIN_STATUS_CODE_VALUE,
                 static::MAX_STATUS_CODE_VALUE
             ));
         }
 
-        if (! is_string($reasonPhrase)) {
-            throw new Exception\InvalidArgumentException(sprintf(
-                'Unsupported response reason phrase; must be a string, received %s',
-                is_object($reasonPhrase) ? $reasonPhrase::class : gettype($reasonPhrase)
-            ));
-        }
-
         if ($reasonPhrase === '' && isset($this->phrases[$code])) {
             $reasonPhrase = $this->phrases[$code];
         }
 
         $this->reasonPhrase = $reasonPhrase;
-        $this->statusCode   = (int) $code;
+        $this->statusCode   = $code;
     }
 }
index 8fdfd4491a7058e9ab92492d4828c51ed02b4cee..8578a6e86dfcd56e17863d1a84b1c13ad26a647f 100644 (file)
@@ -53,7 +53,7 @@ class ServerRequest implements ServerRequestInterface
     public function __construct(
         private array $serverParams = [],
         array $uploadedFiles = [],
-        $uri = null,
+        null|string|UriInterface $uri = null,
         ?string $method = null,
         $body = 'php://input',
         array $headers = [],
@@ -65,7 +65,7 @@ class ServerRequest implements ServerRequestInterface
         $this->validateUploadedFiles($uploadedFiles);
 
         if ($body === 'php://input') {
-            $body = new PhpInputStream();
+            $body = new Stream($body, 'r');
         }
 
         $this->initialize($uri, $method, $body, $headers);
@@ -173,29 +173,29 @@ class ServerRequest implements ServerRequestInterface
     /**
      * {@inheritdoc}
      */
-    public function getAttribute($attribute, $default = null)
+    public function getAttribute(string $name, $default = null)
     {
-        if (! array_key_exists($attribute, $this->attributes)) {
+        if (! array_key_exists($name, $this->attributes)) {
             return $default;
         }
 
-        return $this->attributes[$attribute];
+        return $this->attributes[$name];
     }
 
     /**
      * {@inheritdoc}
      */
-    public function withAttribute($attribute, $value): ServerRequest
+    public function withAttribute(string $name, $value): ServerRequest
     {
-        $new                         = clone $this;
-        $new->attributes[$attribute] = $value;
+        $new                    = clone $this;
+        $new->attributes[$name] = $value;
         return $new;
     }
 
     /**
      * {@inheritdoc}
      */
-    public function withoutAttribute($name): ServerRequest
+    public function withoutAttribute(string $name): ServerRequest
     {
         $new = clone $this;
         unset($new->attributes[$name]);
index 5c6718e34ba92470529ebbcdc05d43e78164c939..ca176e14824dca83e9449c40ae5d15c2c61e7f8b 100644 (file)
@@ -53,14 +53,14 @@ class ServerRequestFactory implements ServerRequestFactoryInterface
         ?array $cookies = null,
         ?array $files = null,
         ?FilterServerRequestInterface $requestFilter = null
-    ): ServerRequest {
-        $requestFilter = $requestFilter ?: FilterUsingXForwardedHeaders::trustReservedSubnets();
+    ): ServerRequestInterface {
+        $requestFilter = $requestFilter ?? FilterUsingXForwardedHeaders::trustReservedSubnets();
 
         $server  = normalizeServer(
-            $server ?: $_SERVER,
+            $server ?? $_SERVER,
             is_callable(self::$apacheRequestHeaders) ? self::$apacheRequestHeaders : null
         );
-        $files   = normalizeUploadedFiles($files ?: $_FILES);
+        $files   = normalizeUploadedFiles($files ?? $_FILES);
         $headers = marshalHeadersFromSapi($server);
 
         if (null === $cookies && array_key_exists('cookie', $headers)) {
@@ -74,9 +74,9 @@ class ServerRequestFactory implements ServerRequestFactoryInterface
             marshalMethodFromSapi($server),
             'php://input',
             $headers,
-            $cookies ?: $_COOKIE,
-            $query ?: $_GET,
-            $body ?: $_POST,
+            $cookies ?? $_COOKIE,
+            $query ?? $_GET,
+            $body ?? $_POST,
             marshalProtocolVersionFromSapi($server)
         ));
     }
index 96c0982ebddbe4ffb3027decd4cc088248488cb2..2af1bb8bce8a4a5d191b7677d1cbd8436f96cb9c 100644 (file)
@@ -4,7 +4,6 @@ declare(strict_types=1);
 
 namespace Laminas\Diactoros;
 
-use GdImage;
 use Psr\Http\Message\StreamInterface;
 use RuntimeException;
 use Stringable;
@@ -39,7 +38,7 @@ class Stream implements StreamInterface, Stringable
     /**
      * A list of allowed stream resource types that are allowed to instantiate a Stream
      */
-    private const ALLOWED_STREAM_RESOURCE_TYPES = ['gd', 'stream'];
+    private const ALLOWED_STREAM_RESOURCE_TYPES = ['stream'];
 
     /** @var resource|null */
     protected $resource;
@@ -174,7 +173,7 @@ class Stream implements StreamInterface, Stringable
     /**
      * {@inheritdoc}
      */
-    public function seek($offset, $whence = SEEK_SET): void
+    public function seek(int $offset, int $whence = SEEK_SET): void
     {
         if (! $this->resource) {
             throw Exception\UnseekableStreamException::dueToMissingResource();
@@ -258,7 +257,7 @@ class Stream implements StreamInterface, Stringable
     /**
      * {@inheritdoc}
      */
-    public function read($length): string
+    public function read(int $length): string
     {
         if (! $this->resource) {
             throw Exception\UnreadableStreamException::dueToMissingResource();
@@ -296,7 +295,7 @@ class Stream implements StreamInterface, Stringable
     /**
      * {@inheritdoc}
      */
-    public function getMetadata($key = null)
+    public function getMetadata(?string $key = null)
     {
         if (null === $key) {
             return stream_get_meta_data($this->resource);
@@ -358,10 +357,6 @@ class Stream implements StreamInterface, Stringable
             return in_array(get_resource_type($resource), self::ALLOWED_STREAM_RESOURCE_TYPES, true);
         }
 
-        if ($resource instanceof GdImage) {
-            return true;
-        }
-
         return false;
     }
 }
index 54596dbaee81c9d268adcecf36ec0ead6643fbf4..8efca295013049858188041a6bc18eef5b420ae2 100644 (file)
@@ -28,9 +28,9 @@ class StreamFactory implements StreamFactoryInterface
     /**
      * {@inheritDoc}
      */
-    public function createStreamFromFile(string $file, string $mode = 'r'): StreamInterface
+    public function createStreamFromFile(string $filename, string $mode = 'r'): StreamInterface
     {
-        return new Stream($file, $mode);
+        return new Stream($filename, $mode);
     }
 
     /**
index 50407365e390d64278ea57116a1fc0f558294425..354b04280d5a456c599a3502e46085a8ef24f7eb 100644 (file)
@@ -59,7 +59,7 @@ class UploadedFile implements UploadedFileInterface
      */
     public function __construct(
         $streamOrFile,
-        private int $size,
+        private ?int $size,
         int $errorStatus,
         private ?string $clientFilename = null,
         private ?string $clientMediaType = null
@@ -125,7 +125,7 @@ class UploadedFile implements UploadedFileInterface
      * @throws Exception\UploadedFileErrorException On any error during the
      *     move operation, or on the second or subsequent call to the method.
      */
-    public function moveTo($targetPath): void
+    public function moveTo(string $targetPath): void
     {
         if ($this->moved) {
             throw new Exception\UploadedFileAlreadyMovedException('Cannot move file; already moved!');
@@ -137,7 +137,7 @@ class UploadedFile implements UploadedFileInterface
             );
         }
 
-        if (! is_string($targetPath) || empty($targetPath)) {
+        if (empty($targetPath)) {
             throw new Exception\InvalidArgumentException(
                 'Invalid path provided for move operation; must be a non-empty string'
             );
index 59f776eee890b6f9e3e3595b760f2361c6bb1997..0c35fdc6f499fd36c165cfbdad3816d82e92fee8 100644 (file)
@@ -10,12 +10,7 @@ use Stringable;
 
 use function array_keys;
 use function explode;
-use function gettype;
 use function implode;
-use function is_float;
-use function is_numeric;
-use function is_object;
-use function is_string;
 use function ltrim;
 use function parse_url;
 use function preg_match;
@@ -220,16 +215,8 @@ class Uri implements UriInterface, Stringable
     /**
      * {@inheritdoc}
      */
-    public function withScheme($scheme): UriInterface
+    public function withScheme(string $scheme): UriInterface
     {
-        if (! is_string($scheme)) {
-            throw new Exception\InvalidArgumentException(sprintf(
-                '%s expects a string argument; received %s',
-                __METHOD__,
-                is_object($scheme) ? $scheme::class : gettype($scheme)
-            ));
-        }
-
         $scheme = $this->filterScheme($scheme);
 
         if ($scheme === $this->scheme) {
@@ -255,25 +242,10 @@ class Uri implements UriInterface, Stringable
      * {@inheritdoc}
      */
     public function withUserInfo(
-        $user,
+        string $user,
         #[SensitiveParameter]
-        $password = null
+        ?string $password = null
     ): UriInterface {
-        if (! is_string($user)) {
-            throw new Exception\InvalidArgumentException(sprintf(
-                '%s expects a string user argument; received %s',
-                __METHOD__,
-                is_object($user) ? $user::class : gettype($user)
-            ));
-        }
-        if (null !== $password && ! is_string($password)) {
-            throw new Exception\InvalidArgumentException(sprintf(
-                '%s expects a string or null password argument; received %s',
-                __METHOD__,
-                is_object($password) ? $password::class : gettype($password)
-            ));
-        }
-
         $info = $this->filterUserInfoPart($user);
         if (null !== $password) {
             $info .= ':' . $this->filterUserInfoPart($password);
@@ -295,16 +267,8 @@ class Uri implements UriInterface, Stringable
     /**
      * {@inheritdoc}
      */
-    public function withHost($host): UriInterface
+    public function withHost(string $host): UriInterface
     {
-        if (! is_string($host)) {
-            throw new Exception\InvalidArgumentException(sprintf(
-                '%s expects a string argument; received %s',
-                __METHOD__,
-                is_object($host) ? $host::class : gettype($host)
-            ));
-        }
-
         if ($host === $this->host) {
             // Do nothing if no change was made.
             return $this;
@@ -319,19 +283,8 @@ class Uri implements UriInterface, Stringable
     /**
      * {@inheritdoc}
      */
-    public function withPort($port): UriInterface
+    public function withPort(?int $port): UriInterface
     {
-        if ($port !== null) {
-            if (! is_numeric($port) || is_float($port)) {
-                throw new Exception\InvalidArgumentException(sprintf(
-                    'Invalid port "%s" specified; must be an integer, an integer string, or null',
-                    is_object($port) ? $port::class : gettype($port)
-                ));
-            }
-
-            $port = (int) $port;
-        }
-
         if ($port === $this->port) {
             // Do nothing if no change was made.
             return $this;
@@ -353,14 +306,8 @@ class Uri implements UriInterface, Stringable
     /**
      * {@inheritdoc}
      */
-    public function withPath($path): UriInterface
+    public function withPath(string $path): UriInterface
     {
-        if (! is_string($path)) {
-            throw new Exception\InvalidArgumentException(
-                'Invalid path provided; must be a string'
-            );
-        }
-
         if (str_contains($path, '?')) {
             throw new Exception\InvalidArgumentException(
                 'Invalid path provided; must not contain a query string'
@@ -389,14 +336,8 @@ class Uri implements UriInterface, Stringable
     /**
      * {@inheritdoc}
      */
-    public function withQuery($query): UriInterface
+    public function withQuery(string $query): UriInterface
     {
-        if (! is_string($query)) {
-            throw new Exception\InvalidArgumentException(
-                'Query string must be a string'
-            );
-        }
-
         if (str_contains($query, '#')) {
             throw new Exception\InvalidArgumentException(
                 'Query string must not include a URI fragment'
@@ -419,16 +360,8 @@ class Uri implements UriInterface, Stringable
     /**
      * {@inheritdoc}
      */
-    public function withFragment($fragment): UriInterface
+    public function withFragment(string $fragment): UriInterface
     {
-        if (! is_string($fragment)) {
-            throw new Exception\InvalidArgumentException(sprintf(
-                '%s expects a string argument; received %s',
-                __METHOD__,
-                is_object($fragment) ? $fragment::class : gettype($fragment)
-            ));
-        }
-
         $fragment = $this->filterFragment($fragment);
 
         if ($fragment === $this->fragment) {
diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/create_uploaded_file.legacy.php b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/create_uploaded_file.legacy.php
deleted file mode 100644 (file)
index fff753f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Zend\Diactoros;
-
-use Laminas\Diactoros\UploadedFile;
-
-use function func_get_args;
-use function Laminas\Diactoros\createUploadedFile as laminas_createUploadedFile;
-
-/**
- * @deprecated Use Laminas\Diactoros\createUploadedFile instead
- */
-function createUploadedFile(array $spec): UploadedFile
-{
-    return laminas_createUploadedFile(...func_get_args());
-}
diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/marshal_headers_from_sapi.legacy.php b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/marshal_headers_from_sapi.legacy.php
deleted file mode 100644 (file)
index 372ad29..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Zend\Diactoros;
-
-use function func_get_args;
-use function Laminas\Diactoros\marshalHeadersFromSapi as laminas_marshalHeadersFromSapi;
-
-/**
- * @deprecated Use Laminas\Diactoros\marshalHeadersFromSapi instead
- */
-function marshalHeadersFromSapi(array $server): array
-{
-    return laminas_marshalHeadersFromSapi(...func_get_args());
-}
index 7fd09996db40e9f11e4f6646b40465b6b95db57d..2819840d181df1faa62067cdc87919cd1bc0e496 100644 (file)
@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace Laminas\Diactoros;
 
+use function array_filter;
 use function array_key_exists;
 use function is_string;
 use function str_starts_with;
@@ -11,9 +12,11 @@ use function strtolower;
 use function strtr;
 use function substr;
 
+use const ARRAY_FILTER_USE_KEY;
+
 /**
  * @param array $server Values obtained from the SAPI (generally `$_SERVER`).
- * @return array Header/value pairs
+ * @return array<non-empty-string, mixed> Header/value pairs
  */
 function marshalHeadersFromSapi(array $server): array
 {
@@ -30,7 +33,7 @@ function marshalHeadersFromSapi(array $server): array
 
     $headers = [];
     foreach ($server as $key => $value) {
-        if (! is_string($key)) {
+        if (! is_string($key) || $key === '') {
             continue;
         }
 
@@ -63,5 +66,9 @@ function marshalHeadersFromSapi(array $server): array
         }
     }
 
-    return $headers;
+    // Filter out integer keys.
+    // These can occur if the translated header name is a string integer.
+    // PHP will cast those to integers when assigned to an array.
+    // This filters them out.
+    return array_filter($headers, fn(string|int $key): bool => is_string($key), ARRAY_FILTER_USE_KEY);
 }
diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/marshal_method_from_sapi.legacy.php b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/marshal_method_from_sapi.legacy.php
deleted file mode 100644 (file)
index 2eb83d9..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Zend\Diactoros;
-
-use function func_get_args;
-use function Laminas\Diactoros\marshalMethodFromSapi as laminas_marshalMethodFromSapi;
-
-/**
- * @deprecated Use Laminas\Diactoros\marshalMethodFromSapi instead
- */
-function marshalMethodFromSapi(array $server): string
-{
-    return laminas_marshalMethodFromSapi(...func_get_args());
-}
diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/marshal_protocol_version_from_sapi.legacy.php b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/marshal_protocol_version_from_sapi.legacy.php
deleted file mode 100644 (file)
index 2c69d6d..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Zend\Diactoros;
-
-use function func_get_args;
-use function Laminas\Diactoros\marshalProtocolVersionFromSapi as laminas_marshalProtocolVersionFromSapi;
-
-/**
- * @deprecated Use Laminas\Diactoros\marshalProtocolVersionFromSapi instead
- */
-function marshalProtocolVersionFromSapi(array $server): string
-{
-    return laminas_marshalProtocolVersionFromSapi(...func_get_args());
-}
diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/marshal_uri_from_sapi.legacy.php b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/marshal_uri_from_sapi.legacy.php
deleted file mode 100644 (file)
index 43fff2a..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Zend\Diactoros;
-
-use Laminas\Diactoros\Uri;
-
-use function func_get_args;
-use function Laminas\Diactoros\marshalUriFromSapi as laminas_marshalUriFromSapi;
-
-/**
- * @deprecated Use Laminas\Diactoros\marshalUriFromSapi instead
- */
-function marshalUriFromSapi(array $server, array $headers): Uri
-{
-    return laminas_marshalUriFromSapi(...func_get_args());
-}
diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/marshal_uri_from_sapi.php b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/marshal_uri_from_sapi.php
deleted file mode 100644 (file)
index 186d6d9..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Laminas\Diactoros;
-
-use function array_change_key_case;
-use function array_key_exists;
-use function assert;
-use function count;
-use function explode;
-use function gettype;
-use function implode;
-use function is_array;
-use function is_bool;
-use function is_string;
-use function ltrim;
-use function preg_match;
-use function preg_replace;
-use function sprintf;
-use function str_contains;
-use function strlen;
-use function strrpos;
-use function strtolower;
-use function substr;
-
-use const CASE_LOWER;
-
-/**
- * Marshal a Uri instance based on the values presnt in the $_SERVER array and headers.
- *
- * @deprecated This function is deprecated as of 2.11.1, and will be removed in
- *     3.0.0. As of 2.11.1, it is no longer used internally.
- *
- * @param array $server SAPI parameters
- * @param array $headers HTTP request headers
- */
-function marshalUriFromSapi(array $server, array $headers): Uri
-{
-    /**
-     * Retrieve a header value from an array of headers using a case-insensitive lookup.
-     *
-     * @param array $headers Key/value header pairs
-     * @param mixed $default Default value to return if header not found
-     * @return mixed
-     */
-    $getHeaderFromArray = static function (string $name, array $headers, $default = null) {
-        $header  = strtolower($name);
-        $headers = array_change_key_case($headers, CASE_LOWER);
-        if (array_key_exists($header, $headers)) {
-            return is_array($headers[$header]) ? implode(', ', $headers[$header]) : $headers[$header];
-        }
-
-        return $default;
-    };
-
-    /**
-     * Marshal the host and port from HTTP headers and/or the PHP environment.
-     *
-     * @return array Array of two items, host and port, in that order (can be
-     *     passed to a list() operation).
-     */
-    $marshalHostAndPort = static function (array $headers, array $server) use ($getHeaderFromArray): array {
-        /**
-         * @param string|array $host
-         * @return array Array of two items, host and port, in that order (can be
-         *     passed to a list() operation).
-         */
-        $marshalHostAndPortFromHeader = static function ($host) {
-            if (is_array($host)) {
-                $host = implode(', ', $host);
-            }
-
-            $port = null;
-
-            // works for regname, IPv4 & IPv6
-            if (preg_match('|\:(\d+)$|', $host, $matches)) {
-                $host = substr($host, 0, -1 * (strlen($matches[1]) + 1));
-                $port = (int) $matches[1];
-            }
-
-            return [$host, $port];
-        };
-
-        /**
-         * @return array Array of two items, host and port, in that order (can be
-         *     passed to a list() operation).
-         */
-        $marshalIpv6HostAndPort = static function (array $server, ?int $port): array {
-            $host = '[' . $server['SERVER_ADDR'] . ']';
-            $port = $port ?: 80;
-            if ($port . ']' === substr($host, strrpos($host, ':') + 1)) {
-                // The last digit of the IPv6-Address has been taken as port
-                // Unset the port so the default port can be used
-                $port = null;
-            }
-            return [$host, $port];
-        };
-
-        static $defaults = ['', null];
-
-        $forwardedHost = $getHeaderFromArray('x-forwarded-host', $headers, false);
-        if ($forwardedHost !== false) {
-            return $marshalHostAndPortFromHeader($forwardedHost);
-        }
-
-        $host = $getHeaderFromArray('host', $headers, false);
-        if ($host !== false) {
-            return $marshalHostAndPortFromHeader($host);
-        }
-
-        if (! isset($server['SERVER_NAME'])) {
-            return $defaults;
-        }
-
-        $host = $server['SERVER_NAME'];
-        $port = isset($server['SERVER_PORT']) ? (int) $server['SERVER_PORT'] : null;
-
-        if (
-            ! isset($server['SERVER_ADDR'])
-            || ! preg_match('/^\[[0-9a-fA-F\:]+\]$/', $host)
-        ) {
-            return [$host, $port];
-        }
-
-        // Misinterpreted IPv6-Address
-        // Reported for Safari on Windows
-        return $marshalIpv6HostAndPort($server, $port);
-    };
-
-    /**
-     * Detect the path for the request
-     *
-     * Looks at a variety of criteria in order to attempt to autodetect the base
-     * request path, including:
-     *
-     * - IIS7 UrlRewrite environment
-     * - REQUEST_URI
-     * - ORIG_PATH_INFO
-     *
-     * From Laminas\Http\PhpEnvironment\Request class
-     */
-    $marshalRequestPath = static function (array $server): string {
-        // IIS7 with URL Rewrite: make sure we get the unencoded url
-        // (double slash problem).
-        $iisUrlRewritten = $server['IIS_WasUrlRewritten'] ?? null;
-        $unencodedUrl    = $server['UNENCODED_URL'] ?? '';
-        if ('1' === $iisUrlRewritten && ! empty($unencodedUrl)) {
-            return $unencodedUrl;
-        }
-
-        $requestUri = $server['REQUEST_URI'] ?? null;
-
-        if ($requestUri !== null) {
-            return preg_replace('#^[^/:]+://[^/]+#', '', $requestUri);
-        }
-
-        $origPathInfo = $server['ORIG_PATH_INFO'] ?? null;
-        if (empty($origPathInfo)) {
-            return '/';
-        }
-
-        return $origPathInfo;
-    };
-
-    $uri = new Uri('');
-
-    // URI scheme
-    $scheme            = 'http';
-    $marshalHttpsValue = static function ($https): bool {
-        if (is_bool($https)) {
-            return $https;
-        }
-
-        if (! is_string($https)) {
-            throw new Exception\InvalidArgumentException(sprintf(
-                'SAPI HTTPS value MUST be a string or boolean; received %s',
-                gettype($https)
-            ));
-        }
-
-        return 'on' === strtolower($https);
-    };
-    if (array_key_exists('HTTPS', $server)) {
-        $https = $marshalHttpsValue($server['HTTPS']);
-    } elseif (array_key_exists('https', $server)) {
-        $https = $marshalHttpsValue($server['https']);
-    } else {
-        $https = false;
-    }
-
-    if (
-        $https
-        || strtolower($getHeaderFromArray('x-forwarded-proto', $headers, '')) === 'https'
-    ) {
-        $scheme = 'https';
-    }
-    $uri = $uri->withScheme($scheme);
-
-    // Set the host
-    [$host, $port] = $marshalHostAndPort($headers, $server);
-    if (! empty($host)) {
-        $uri = $uri->withHost($host);
-        if (! empty($port)) {
-            $uri = $uri->withPort($port);
-        }
-    }
-
-    // URI path
-    $path = $marshalRequestPath($server);
-
-    // Strip query string
-    $path = explode('?', $path, 2)[0];
-
-    // URI query
-    $query = '';
-    if (isset($server['QUERY_STRING'])) {
-        $query = ltrim($server['QUERY_STRING'], '?');
-    }
-
-    // URI fragment
-    $fragment = '';
-    if (str_contains($path, '#')) {
-        $parts = explode('#', $path, 2);
-        assert(count($parts) >= 2);
-        [$path, $fragment] = $parts;
-    }
-
-    return $uri
-        ->withPath($path)
-        ->withFragment($fragment)
-        ->withQuery($query);
-}
diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/normalize_server.legacy.php b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/normalize_server.legacy.php
deleted file mode 100644 (file)
index b355c4d..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Zend\Diactoros;
-
-use function func_get_args;
-use function Laminas\Diactoros\normalizeServer as laminas_normalizeServer;
-
-/**
- * @deprecated Use Laminas\Diactoros\normalizeServer instead
- */
-function normalizeServer(array $server, ?callable $apacheRequestHeaderCallback = null): array
-{
-    return laminas_normalizeServer(...func_get_args());
-}
diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/normalize_uploaded_files.legacy.php b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/normalize_uploaded_files.legacy.php
deleted file mode 100644 (file)
index b21323f..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Zend\Diactoros;
-
-use function func_get_args;
-use function Laminas\Diactoros\normalizeUploadedFiles as laminas_normalizeUploadedFiles;
-
-/**
- * @deprecated Use Laminas\Diactoros\normalizeUploadedFiles instead
- */
-function normalizeUploadedFiles(array $files): array
-{
-    return laminas_normalizeUploadedFiles(...func_get_args());
-}
diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/parse_cookie_header.legacy.php b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/parse_cookie_header.legacy.php
deleted file mode 100644 (file)
index 8c9a46a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Zend\Diactoros;
-
-use function func_get_args;
-use function Laminas\Diactoros\parseCookieHeader as laminas_parseCookieHeader;
-
-/**
- * @deprecated Use {@see \Laminas\Diactoros\parseCookieHeader} instead
- *
- * @param string $cookieHeader A string cookie header value.
- * @return array<non-empty-string, string> key/value cookie pairs.
- */
-function parseCookieHeader($cookieHeader): array
-{
-    return laminas_parseCookieHeader(...func_get_args());
-}
index 56e8c0a6dbf7592669fd5dbf2f28ba3b08507da5..c66e5aba40c97459c9ec9cb21fcc6a52153afd9c 100644 (file)
@@ -7,7 +7,7 @@
     "authors": [
         {
             "name": "PHP-FIG",
-            "homepage": "http://www.php-fig.org/"
+            "homepage": "https://www.php-fig.org/"
         }
     ],
     "require": {
@@ -20,7 +20,7 @@
     },
     "extra": {
         "branch-alias": {
-            "dev-master": "1.1.x-dev"
+            "dev-master": "2.0.x-dev"
         }
     }
 }
index 8cdb4ed63af3c9ecffb39048360c166ce45ee91b..a83c98518d5496f87460f822473b84c8b85ea28c 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 
-declare(strict_types=1);
-
 namespace Psr\Http\Message;
 
 /**
@@ -25,7 +23,7 @@ interface MessageInterface
      *
      * @return string HTTP protocol version.
      */
-    public function getProtocolVersion();
+    public function getProtocolVersion(): string;
 
     /**
      * Return an instance with the specified HTTP protocol version.
@@ -40,7 +38,7 @@ interface MessageInterface
      * @param string $version HTTP protocol version
      * @return static
      */
-    public function withProtocolVersion(string $version);
+    public function withProtocolVersion(string $version): MessageInterface;
 
     /**
      * Retrieves all message header values.
@@ -67,7 +65,7 @@ interface MessageInterface
      *     key MUST be a header name, and each value MUST be an array of strings
      *     for that header.
      */
-    public function getHeaders();
+    public function getHeaders(): array;
 
     /**
      * Checks if a header exists by the given case-insensitive name.
@@ -77,7 +75,7 @@ interface MessageInterface
      *     name using a case-insensitive string comparison. Returns false if
      *     no matching header name is found in the message.
      */
-    public function hasHeader(string $name);
+    public function hasHeader(string $name): bool;
 
     /**
      * Retrieves a message header value by the given case-insensitive name.
@@ -93,7 +91,7 @@ interface MessageInterface
      *    header. If the header does not appear in the message, this method MUST
      *    return an empty array.
      */
-    public function getHeader(string $name);
+    public function getHeader(string $name): array;
 
     /**
      * Retrieves a comma-separated string of the values for a single header.
@@ -114,7 +112,7 @@ interface MessageInterface
      *    concatenated together using a comma. If the header does not appear in
      *    the message, this method MUST return an empty string.
      */
-    public function getHeaderLine(string $name);
+    public function getHeaderLine(string $name): string;
 
     /**
      * Return an instance with the provided value replacing the specified header.
@@ -131,7 +129,7 @@ interface MessageInterface
      * @return static
      * @throws \InvalidArgumentException for invalid header names or values.
      */
-    public function withHeader(string $name, $value);
+    public function withHeader(string $name, $value): MessageInterface;
 
     /**
      * Return an instance with the specified header appended with the given value.
@@ -149,7 +147,7 @@ interface MessageInterface
      * @return static
      * @throws \InvalidArgumentException for invalid header names or values.
      */
-    public function withAddedHeader(string $name, $value);
+    public function withAddedHeader(string $name, $value): MessageInterface;
 
     /**
      * Return an instance without the specified header.
@@ -163,14 +161,14 @@ interface MessageInterface
      * @param string $name Case-insensitive header field name to remove.
      * @return static
      */
-    public function withoutHeader(string $name);
+    public function withoutHeader(string $name): MessageInterface;
 
     /**
      * Gets the body of the message.
      *
      * @return StreamInterface Returns the body as a stream.
      */
-    public function getBody();
+    public function getBody(): StreamInterface;
 
     /**
      * Return an instance with the specified message body.
@@ -185,5 +183,5 @@ interface MessageInterface
      * @return static
      * @throws \InvalidArgumentException When the body is not valid.
      */
-    public function withBody(StreamInterface $body);
+    public function withBody(StreamInterface $body): MessageInterface;
 }
index 38066df6bd3146689a570b721d37d746937648b5..33f85e559d0241e33d3b94bc3656441d188ac54a 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 
-declare(strict_types=1);
-
 namespace Psr\Http\Message;
 
 /**
@@ -41,7 +39,7 @@ interface RequestInterface extends MessageInterface
      *
      * @return string
      */
-    public function getRequestTarget();
+    public function getRequestTarget(): string;
 
     /**
      * Return an instance with the specific request-target.
@@ -60,14 +58,15 @@ interface RequestInterface extends MessageInterface
      * @param string $requestTarget
      * @return static
      */
-    public function withRequestTarget(string $requestTarget);
+    public function withRequestTarget(string $requestTarget): RequestInterface;
+
 
     /**
      * Retrieves the HTTP method of the request.
      *
      * @return string Returns the request method.
      */
-    public function getMethod();
+    public function getMethod(): string;
 
     /**
      * Return an instance with the provided HTTP method.
@@ -84,7 +83,7 @@ interface RequestInterface extends MessageInterface
      * @return static
      * @throws \InvalidArgumentException for invalid HTTP methods.
      */
-    public function withMethod(string $method);
+    public function withMethod(string $method): RequestInterface;
 
     /**
      * Retrieves the URI instance.
@@ -95,7 +94,7 @@ interface RequestInterface extends MessageInterface
      * @return UriInterface Returns a UriInterface instance
      *     representing the URI of the request.
      */
-    public function getUri();
+    public function getUri(): UriInterface;
 
     /**
      * Returns an instance with the provided URI.
@@ -127,5 +126,5 @@ interface RequestInterface extends MessageInterface
      * @param bool $preserveHost Preserve the original state of the Host header.
      * @return static
      */
-    public function withUri(UriInterface $uri, bool $preserveHost = false);
+    public function withUri(UriInterface $uri, bool $preserveHost = false): RequestInterface;
 }
index f85ca48aadc66ab9a16e11d3433f8c63421b6664..e9299a91443f2d0e745a7bf8c1aa0e9f1249db4c 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 
-declare(strict_types=1);
-
 namespace Psr\Http\Message;
 
 /**
@@ -29,7 +27,7 @@ interface ResponseInterface extends MessageInterface
      *
      * @return int Status code.
      */
-    public function getStatusCode();
+    public function getStatusCode(): int;
 
     /**
      * Return an instance with the specified status code and, optionally, reason phrase.
@@ -51,7 +49,7 @@ interface ResponseInterface extends MessageInterface
      * @return static
      * @throws \InvalidArgumentException For invalid status code arguments.
      */
-    public function withStatus(int $code, string $reasonPhrase = '');
+    public function withStatus(int $code, string $reasonPhrase = ''): ResponseInterface;
 
     /**
      * Gets the response reason phrase associated with the status code.
@@ -66,5 +64,5 @@ interface ResponseInterface extends MessageInterface
      * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
      * @return string Reason phrase; must return an empty string if none present.
      */
-    public function getReasonPhrase();
+    public function getReasonPhrase(): string;
 }
index 5e6d9649287a2767b82d370391864950ace41825..8625d0e100d93adf91ad364e35c7dcad02c1cfeb 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 
-declare(strict_types=1);
-
 namespace Psr\Http\Message;
 
 /**
@@ -53,7 +51,7 @@ interface ServerRequestInterface extends RequestInterface
      *
      * @return array
      */
-    public function getServerParams();
+    public function getServerParams(): array;
 
     /**
      * Retrieve cookies.
@@ -65,7 +63,7 @@ interface ServerRequestInterface extends RequestInterface
      *
      * @return array
      */
-    public function getCookieParams();
+    public function getCookieParams(): array;
 
     /**
      * Return an instance with the specified cookies.
@@ -84,7 +82,7 @@ interface ServerRequestInterface extends RequestInterface
      * @param array $cookies Array of key/value pairs representing cookies.
      * @return static
      */
-    public function withCookieParams(array $cookies);
+    public function withCookieParams(array $cookies): ServerRequestInterface;
 
     /**
      * Retrieve query string arguments.
@@ -98,7 +96,7 @@ interface ServerRequestInterface extends RequestInterface
      *
      * @return array
      */
-    public function getQueryParams();
+    public function getQueryParams(): array;
 
     /**
      * Return an instance with the specified query string arguments.
@@ -122,7 +120,7 @@ interface ServerRequestInterface extends RequestInterface
      *     $_GET.
      * @return static
      */
-    public function withQueryParams(array $query);
+    public function withQueryParams(array $query): ServerRequestInterface;
 
     /**
      * Retrieve normalized file upload data.
@@ -136,7 +134,7 @@ interface ServerRequestInterface extends RequestInterface
      * @return array An array tree of UploadedFileInterface instances; an empty
      *     array MUST be returned if no data is present.
      */
-    public function getUploadedFiles();
+    public function getUploadedFiles(): array;
 
     /**
      * Create a new instance with the specified uploaded files.
@@ -149,7 +147,7 @@ interface ServerRequestInterface extends RequestInterface
      * @return static
      * @throws \InvalidArgumentException if an invalid structure is provided.
      */
-    public function withUploadedFiles(array $uploadedFiles);
+    public function withUploadedFiles(array $uploadedFiles): ServerRequestInterface;
 
     /**
      * Retrieve any parameters provided in the request body.
@@ -196,7 +194,7 @@ interface ServerRequestInterface extends RequestInterface
      * @throws \InvalidArgumentException if an unsupported argument type is
      *     provided.
      */
-    public function withParsedBody($data);
+    public function withParsedBody($data): ServerRequestInterface;
 
     /**
      * Retrieve attributes derived from the request.
@@ -209,7 +207,7 @@ interface ServerRequestInterface extends RequestInterface
      *
      * @return array Attributes derived from the request.
      */
-    public function getAttributes();
+    public function getAttributes(): array;
 
     /**
      * Retrieve a single derived request attribute.
@@ -243,7 +241,7 @@ interface ServerRequestInterface extends RequestInterface
      * @param mixed $value The value of the attribute.
      * @return static
      */
-    public function withAttribute(string $name, $value);
+    public function withAttribute(string $name, $value): ServerRequestInterface;
 
     /**
      * Return an instance that removes the specified derived request attribute.
@@ -259,5 +257,5 @@ interface ServerRequestInterface extends RequestInterface
      * @param string $name The attribute name.
      * @return static
      */
-    public function withoutAttribute(string $name);
+    public function withoutAttribute(string $name): ServerRequestInterface;
 }
index 592466390b9215dc66ba18ff392ca3241b143ac8..a62aabb8288b8d063ac2ebf746820a3292dfa7ec 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 
-declare(strict_types=1);
-
 namespace Psr\Http\Message;
 
 /**
@@ -27,14 +25,14 @@ interface StreamInterface
      * @see http://php.net/manual/en/language.oop5.magic.php#object.tostring
      * @return string
      */
-    public function __toString();
+    public function __toString(): string;
 
     /**
      * Closes the stream and any underlying resources.
      *
      * @return void
      */
-    public function close();
+    public function close(): void;
 
     /**
      * Separates any underlying resources from the stream.
@@ -50,7 +48,7 @@ interface StreamInterface
      *
      * @return int|null Returns the size in bytes if known, or null if unknown.
      */
-    public function getSize();
+    public function getSize(): ?int;
 
     /**
      * Returns the current position of the file read/write pointer
@@ -58,21 +56,21 @@ interface StreamInterface
      * @return int Position of the file pointer
      * @throws \RuntimeException on error.
      */
-    public function tell();
+    public function tell(): int;
 
     /**
      * Returns true if the stream is at the end of the stream.
      *
      * @return bool
      */
-    public function eof();
+    public function eof(): bool;
 
     /**
      * Returns whether or not the stream is seekable.
      *
      * @return bool
      */
-    public function isSeekable();
+    public function isSeekable(): bool;
 
     /**
      * Seek to a position in the stream.
@@ -86,7 +84,7 @@ interface StreamInterface
      *     SEEK_END: Set position to end-of-stream plus offset.
      * @throws \RuntimeException on failure.
      */
-    public function seek(int $offset, int $whence = SEEK_SET);
+    public function seek(int $offset, int $whence = SEEK_SET): void;
 
     /**
      * Seek to the beginning of the stream.
@@ -98,14 +96,14 @@ interface StreamInterface
      * @link http://www.php.net/manual/en/function.fseek.php
      * @throws \RuntimeException on failure.
      */
-    public function rewind();
+    public function rewind(): void;
 
     /**
      * Returns whether or not the stream is writable.
      *
      * @return bool
      */
-    public function isWritable();
+    public function isWritable(): bool;
 
     /**
      * Write data to the stream.
@@ -114,14 +112,14 @@ interface StreamInterface
      * @return int Returns the number of bytes written to the stream.
      * @throws \RuntimeException on failure.
      */
-    public function write(string $string);
+    public function write(string $string): int;
 
     /**
      * Returns whether or not the stream is readable.
      *
      * @return bool
      */
-    public function isReadable();
+    public function isReadable(): bool;
 
     /**
      * Read data from the stream.
@@ -133,7 +131,7 @@ interface StreamInterface
      *     if no bytes are available.
      * @throws \RuntimeException if an error occurs.
      */
-    public function read(int $length);
+    public function read(int $length): string;
 
     /**
      * Returns the remaining contents in a string
@@ -142,7 +140,7 @@ interface StreamInterface
      * @throws \RuntimeException if unable to read or an error occurs while
      *     reading.
      */
-    public function getContents();
+    public function getContents(): string;
 
     /**
      * Get stream metadata as an associative array or retrieve a specific key.
index aba632158738a527900a1cb76a21039d0b22c0f0..dd19d653819f1881961257ef74424223aa2dc909 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 
-declare(strict_types=1);
-
 namespace Psr\Http\Message;
 
 /**
@@ -30,7 +28,7 @@ interface UploadedFileInterface
      * @throws \RuntimeException in cases when no stream is available or can be
      *     created.
      */
-    public function getStream();
+    public function getStream(): StreamInterface;
 
     /**
      * Move the uploaded file to a new location.
@@ -64,7 +62,7 @@ interface UploadedFileInterface
      * @throws \RuntimeException on any error during the move operation, or on
      *     the second or subsequent call to the method.
      */
-    public function moveTo(string $targetPath);
+    public function moveTo(string $targetPath): void;
     
     /**
      * Retrieve the file size.
@@ -75,7 +73,7 @@ interface UploadedFileInterface
      *
      * @return int|null The file size in bytes or null if unknown.
      */
-    public function getSize();
+    public function getSize(): ?int;
     
     /**
      * Retrieve the error associated with the uploaded file.
@@ -91,7 +89,7 @@ interface UploadedFileInterface
      * @see http://php.net/manual/en/features.file-upload.errors.php
      * @return int One of PHP's UPLOAD_ERR_XXX constants.
      */
-    public function getError();
+    public function getError(): int;
     
     /**
      * Retrieve the filename sent by the client.
@@ -106,7 +104,7 @@ interface UploadedFileInterface
      * @return string|null The filename sent by the client or null if none
      *     was provided.
      */
-    public function getClientFilename();
+    public function getClientFilename(): ?string;
     
     /**
      * Retrieve the media type sent by the client.
@@ -121,5 +119,5 @@ interface UploadedFileInterface
      * @return string|null The media type sent by the client or null if none
      *     was provided.
      */
-    public function getClientMediaType();
+    public function getClientMediaType(): ?string;
 }
index d974de0de5c3f016af08cafe83d4937c9ef76580..15e2cf2862850b5b659440aa1e966debc2457ae4 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 
-declare(strict_types=1);
-
 namespace Psr\Http\Message;
 
 /**
@@ -40,7 +38,7 @@ interface UriInterface
      * @see https://tools.ietf.org/html/rfc3986#section-3.1
      * @return string The URI scheme.
      */
-    public function getScheme();
+    public function getScheme(): string;
 
     /**
      * Retrieve the authority component of the URI.
@@ -60,7 +58,7 @@ interface UriInterface
      * @see https://tools.ietf.org/html/rfc3986#section-3.2
      * @return string The URI authority, in "[user-info@]host[:port]" format.
      */
-    public function getAuthority();
+    public function getAuthority(): string;
 
     /**
      * Retrieve the user information component of the URI.
@@ -77,7 +75,7 @@ interface UriInterface
      *
      * @return string The URI user information, in "username[:password]" format.
      */
-    public function getUserInfo();
+    public function getUserInfo(): string;
 
     /**
      * Retrieve the host component of the URI.
@@ -90,7 +88,7 @@ interface UriInterface
      * @see http://tools.ietf.org/html/rfc3986#section-3.2.2
      * @return string The URI host.
      */
-    public function getHost();
+    public function getHost(): string;
 
     /**
      * Retrieve the port component of the URI.
@@ -107,7 +105,7 @@ interface UriInterface
      *
      * @return null|int The URI port.
      */
-    public function getPort();
+    public function getPort(): ?int;
 
     /**
      * Retrieve the path component of the URI.
@@ -134,7 +132,7 @@ interface UriInterface
      * @see https://tools.ietf.org/html/rfc3986#section-3.3
      * @return string The URI path.
      */
-    public function getPath();
+    public function getPath(): string;
 
     /**
      * Retrieve the query string of the URI.
@@ -156,7 +154,7 @@ interface UriInterface
      * @see https://tools.ietf.org/html/rfc3986#section-3.4
      * @return string The URI query string.
      */
-    public function getQuery();
+    public function getQuery(): string;
 
     /**
      * Retrieve the fragment component of the URI.
@@ -174,7 +172,7 @@ interface UriInterface
      * @see https://tools.ietf.org/html/rfc3986#section-3.5
      * @return string The URI fragment.
      */
-    public function getFragment();
+    public function getFragment(): string;
 
     /**
      * Return an instance with the specified scheme.
@@ -191,7 +189,7 @@ interface UriInterface
      * @return static A new instance with the specified scheme.
      * @throws \InvalidArgumentException for invalid or unsupported schemes.
      */
-    public function withScheme(string $scheme);
+    public function withScheme(string $scheme): UriInterface;
 
     /**
      * Return an instance with the specified user information.
@@ -207,7 +205,7 @@ interface UriInterface
      * @param null|string $password The password associated with $user.
      * @return static A new instance with the specified user information.
      */
-    public function withUserInfo(string $user, ?string $password = null);
+    public function withUserInfo(string $user, ?string $password = null): UriInterface;
 
     /**
      * Return an instance with the specified host.
@@ -221,7 +219,7 @@ interface UriInterface
      * @return static A new instance with the specified host.
      * @throws \InvalidArgumentException for invalid hostnames.
      */
-    public function withHost(string $host);
+    public function withHost(string $host): UriInterface;
 
     /**
      * Return an instance with the specified port.
@@ -240,7 +238,7 @@ interface UriInterface
      * @return static A new instance with the specified port.
      * @throws \InvalidArgumentException for invalid ports.
      */
-    public function withPort(?int $port);
+    public function withPort(?int $port): UriInterface;
 
     /**
      * Return an instance with the specified path.
@@ -264,7 +262,7 @@ interface UriInterface
      * @return static A new instance with the specified path.
      * @throws \InvalidArgumentException for invalid paths.
      */
-    public function withPath(string $path);
+    public function withPath(string $path): UriInterface;
 
     /**
      * Return an instance with the specified query string.
@@ -281,7 +279,7 @@ interface UriInterface
      * @return static A new instance with the specified query string.
      * @throws \InvalidArgumentException for invalid query strings.
      */
-    public function withQuery(string $query);
+    public function withQuery(string $query): UriInterface;
 
     /**
      * Return an instance with the specified URI fragment.
@@ -297,7 +295,7 @@ interface UriInterface
      * @param string $fragment The fragment to use with the new instance.
      * @return static A new instance with the specified fragment.
      */
-    public function withFragment(string $fragment);
+    public function withFragment(string $fragment): UriInterface;
 
     /**
      * Return the string representation as a URI reference.
@@ -322,5 +320,5 @@ interface UriInterface
      * @see http://tools.ietf.org/html/rfc3986#section-4.1
      * @return string
      */
-    public function __toString();
+    public function __toString(): string;
 }