From ff3f9743cc1a3039e9a3e460a081e4fc58b9d6e1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 11 Apr 2023 08:47:15 +0200 Subject: update to 1.0.2 allow psr/http-message 2.0 --- composer.json | 36 ++++++++++++++++++++++++++++++++++++ php-psr-http-server-handler.spec | 33 +++++++++++++++++++-------------- 2 files changed, 55 insertions(+), 14 deletions(-) create mode 100644 composer.json diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..c54b2de --- /dev/null +++ b/composer.json @@ -0,0 +1,36 @@ +{ + "name": "psr/http-server-handler", + "description": "Common interface for HTTP server-side request handler", + "keywords": [ + "psr", + "psr-7", + "psr-15", + "http-interop", + "http", + "server", + "handler", + "request", + "response" + ], + "license": "MIT", + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "require": { + "php": ">=7.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Server\\": "src/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/php-psr-http-server-handler.spec b/php-psr-http-server-handler.spec index e327a77..1d38965 100644 --- a/php-psr-http-server-handler.spec +++ b/php-psr-http-server-handler.spec @@ -1,14 +1,14 @@ # remirepo/fedora spec file for php-psr-http-server-handler # -# Copyright (c) 2019 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2019-2023 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # # Github -%global gh_commit aff2f80e33b7f026ec96bb42f63242dc50ffcae7 +%global gh_commit 84c4fb66179be4caaf8e97bd239203245302e7d4 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner php-fig %global gh_project http-server-handler @@ -21,7 +21,7 @@ %global ns_sub Server Name: php-%{pk_vendor}-%{pk_project} -Version: 1.0.1 +Version: 1.0.2 Release: 1%{?dist} Summary: Common interface for HTTP server-side request handler @@ -35,26 +35,24 @@ BuildRequires: php(language) >= 7.0 BuildRequires: php-cli # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-composer(%{pk_vendor}/http-message) >= 1.0 with php-composer(%{pk_vendor}/http-message) < 2) -# remirepo:4 +BuildRequires: (php-composer(%{pk_vendor}/http-message) >= 1.0 with php-composer(%{pk_vendor}/http-message) < 3) +# remirepo:3 %else -BuildRequires: php-composer(%{pk_vendor}/http-message) < 2 -BuildRequires: php-composer(%{pk_vendor}/http-message) >= 1.0 +BuildRequires: php-psr-http-message %endif # Autoloader BuildRequires: php-fedora-autoloader-devel # From composer.json, "require": { # "php": "^7.0", -# "psr/http-message": "^1.0" +# "psr/http-message": "^1.0 || ^2.0" Requires: php(language) >= 7.0 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-composer(%{pk_vendor}/http-message) >= 1.0 with php-composer(%{pk_vendor}/http-message) < 2) -# remirepo:4 +Requires: (php-composer(%{pk_vendor}/http-message) >= 1.0 with php-composer(%{pk_vendor}/http-message) < 3) +# remirepo:3 %else -Requires: php-composer(%{pk_vendor}/http-message) < 2 -Requires: php-composer(%{pk_vendor}/http-message) >= 1.0 +Requires: php-psr-http-message %endif # phpcompatinfo (computed from version 1.0.0) # only core @@ -85,7 +83,10 @@ Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}/%{ns_sub}/autoload.php %{_bindir}/phpab --template fedora --output src/autoload.php src cat << 'EOF' | tee -a src/autoload.php \Fedora\Autoloader\Dependencies::required([ - '%{_datadir}/php/Psr/Http/Message/autoload.php', + [ + '%{_datadir}/php/Psr/Http/Message2/autoload.php', + '%{_datadir}/php/Psr/Http/Message/autoload.php', + ], ]); EOF @@ -113,5 +114,9 @@ exit (interface_exists("%{ns_vendor}\\%{ns_project}\\%{ns_sub}\\RequestHandlerIn %changelog +* Tue Apr 11 2023 Remi Collet - 1.0.2-1 +- update to 1.0.2 +- allow psr/http-message 2.0 + * Mon Dec 16 2019 Remi Collet - 1.0.1-1 - Initial package, version 1.0.1 -- cgit