From cf8ffb9c692fe898661a35fcba4c2e51ff3ce4ac Mon Sep 17 00:00:00 2001 From: Aleksei Khudiakov Date: Tue, 2 May 2023 02:34:31 +1000 Subject: [PATCH 1/3] Drop legacy helper functions in Zend namespace Signed-off-by: Aleksei Khudiakov --- composer.json | 10 +---- psalm-baseline.xml | 42 ------------------- src/functions/create_uploaded_file.legacy.php | 18 -------- .../marshal_headers_from_sapi.legacy.php | 16 ------- .../marshal_method_from_sapi.legacy.php | 16 ------- ...shal_protocol_version_from_sapi.legacy.php | 16 ------- .../marshal_uri_from_sapi.legacy.php | 18 -------- src/functions/normalize_server.legacy.php | 16 ------- .../normalize_uploaded_files.legacy.php | 16 ------- src/functions/parse_cookie_header.legacy.php | 19 --------- 10 files changed, 1 insertion(+), 186 deletions(-) delete mode 100644 src/functions/create_uploaded_file.legacy.php delete mode 100644 src/functions/marshal_headers_from_sapi.legacy.php delete mode 100644 src/functions/marshal_method_from_sapi.legacy.php delete mode 100644 src/functions/marshal_protocol_version_from_sapi.legacy.php delete mode 100644 src/functions/marshal_uri_from_sapi.legacy.php delete mode 100644 src/functions/normalize_server.legacy.php delete mode 100644 src/functions/normalize_uploaded_files.legacy.php delete mode 100644 src/functions/parse_cookie_header.legacy.php diff --git a/composer.json b/composer.json index b0c7a482..2a4fdcec 100644 --- a/composer.json +++ b/composer.json @@ -66,15 +66,7 @@ "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/" diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 23ba42ad..90d56ad1 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -276,11 +276,6 @@ parseUri - - - func_get_args() - - @@ -289,11 +284,6 @@ - - - func_get_args() - - $headers[$name] @@ -301,11 +291,6 @@ $value - - - func_get_args() - - string @@ -315,22 +300,11 @@ - - - func_get_args() - - - - - func_get_args() - func_get_args() - - $default @@ -377,12 +351,6 @@ - - - func_get_args() - func_get_args() - - @@ -394,11 +362,6 @@ - - - func_get_args() - - $normalized @@ -440,11 +403,6 @@ )]]> - - - func_get_args() - - $cookies diff --git a/src/functions/create_uploaded_file.legacy.php b/src/functions/create_uploaded_file.legacy.php deleted file mode 100644 index fff753ff..00000000 --- a/src/functions/create_uploaded_file.legacy.php +++ /dev/null @@ -1,18 +0,0 @@ - key/value cookie pairs. - */ -function parseCookieHeader($cookieHeader): array -{ - return laminas_parseCookieHeader(...func_get_args()); -} From 29cf68e2763f971af5fa3ee9ff9d8ace192327e0 Mon Sep 17 00:00:00 2001 From: Aleksei Khudiakov Date: Tue, 2 May 2023 03:19:22 +1000 Subject: [PATCH 2/3] Bump psalm Signed-off-by: Aleksei Khudiakov --- composer.json | 2 +- composer.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 2a4fdcec..86ef4247 100644 --- a/composer.json +++ b/composer.json @@ -48,7 +48,7 @@ "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", diff --git a/composer.lock b/composer.lock index df101525..37cdfe55 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "7e672869013f70d75ddb58f532efe73f", + "content-hash": "e0b175cb64e0f84163192b554fdb4836", "packages": [ { "name": "psr/http-factory", From f88a19c990262faeda2c05550b2afc68f07230e1 Mon Sep 17 00:00:00 2001 From: Aleksei Khudiakov Date: Tue, 2 May 2023 03:29:46 +1000 Subject: [PATCH 3/3] Drop conflict with zend-diactoros Signed-off-by: Aleksei Khudiakov --- composer.json | 3 --- composer.lock | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 86ef4247..e64c99a9 100644 --- a/composer.json +++ b/composer.json @@ -54,9 +54,6 @@ "psr/http-factory-implementation": "1.0", "psr/http-message-implementation": "1.0" }, - "conflict": { - "zendframework/zend-diactoros": "*" - }, "autoload": { "files": [ "src/functions/create_uploaded_file.php", diff --git a/composer.lock b/composer.lock index 37cdfe55..374b4f92 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "e0b175cb64e0f84163192b554fdb4836", + "content-hash": "c0dbef991657278ec00fc58f809172f3", "packages": [ { "name": "psr/http-factory",