From 20a0abfaa12cca1a680228abaf9bfbd1264f8ffe Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 14 Jan 2020 13:59:04 +0100 Subject: update to 2.2.2 raise dependency on http-interop/http-middleware 0.5 add dependency on webimpress/http-middleware-compatibility switch to phpunit6 enable upstream test suite --- composer.json | 42 ++++++++++++++++++--------- php-zendframework-zend-stratigility.spec | 50 ++++++++++++++++++++------------ 2 files changed, 60 insertions(+), 32 deletions(-) diff --git a/composer.json b/composer.json index b56db26..1644574 100644 --- a/composer.json +++ b/composer.json @@ -6,34 +6,49 @@ "keywords": [ "http", "psr-7", - "middleware" + "middleware", + "zf", + "zendframework" ], "homepage": "https://github.com/zendframework/zend-stratigility", "support": { + "docs": "https://docs.zendframework.com/zend-stratigility/", "issues": "https://github.com/zendframework/zend-stratigility/issues", - "source": "https://github.com/zendframework/zend-stratigility" + "source": "https://github.com/zendframework/zend-stratigility", + "rss": "https://github.com/zendframework/zend-stratigility/releases.atom", + "slack": "https://zendframework-slack.herokuapp.com", + "forum": "https://discourse.zendframework.com/c/questions/expressive" }, "extra": { "branch-alias": { - "dev-master": "1.3.0-dev", - "dev-develop": "2.0.0-dev" + "dev-master": "2.2.x-dev", + "dev-develop": "3.0.x-dev" } }, + "config": { + "sort-packages": true + }, "require": { "php": "^5.6 || ^7.0", "psr/http-message": "^1.0", - "zendframework/zend-escaper": "^2.3", - "http-interop/http-middleware": "^0.2.0" + "webimpress/http-middleware-compatibility": "^0.1.4", + "zendframework/zend-escaper": "^2.3" }, "require-dev": { - "zendframework/zend-diactoros": "^1.0", - "phpunit/phpunit": "^5.6", - "zendframework/zend-coding-standard": "~1.0.0" + "malukenho/docheader": "^0.1.5", + "phpunit/phpunit": "^5.7.22 || ^6.4.1", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-diactoros": "^1.0" }, "suggest": { "psr/http-message-implementation": "Please install a psr/http-message-implementation to consume Stratigility; e.g., zendframework/zend-diactoros" }, "autoload": { + "files": [ + "src/functions/double-pass-middleware.php", + "src/functions/middleware.php", + "src/functions/path.php" + ], "psr-4": { "Zend\\Stratigility\\": "src/" } @@ -45,13 +60,14 @@ }, "scripts": { "check": [ + "@license-check", "@cs-check", "@test" ], - "upload-coverage": "coveralls -v", - "cs-check": "phpcs --colors", - "cs-fix": "phpcbf --colors", + "cs-check": "phpcs", + "cs-fix": "phpcbf", + "license-check": "docheader check src/ test/", "test": "phpunit --colors=always", - "test-coverage": "phpunit --coverage-clover clover.xml" + "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" } } diff --git a/php-zendframework-zend-stratigility.spec b/php-zendframework-zend-stratigility.spec index b105333..1334252 100644 --- a/php-zendframework-zend-stratigility.spec +++ b/php-zendframework-zend-stratigility.spec @@ -1,13 +1,13 @@ # remirepo/Fedora spec file for php-zendframework-zend-stratigility # -# Copyright (c) 2016-2018 Remi Collet +# Copyright (c) 2016-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%global bootstrap 1 -%global gh_commit 2c4120d2af215c8261a36e0bc3aa8e179e05e148 +%global bootstrap 0 +%global gh_commit 840e41d1984e8845c5539c769fedc5e7bb00a4d5 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner zendframework %global gh_project zend-stratigility @@ -20,11 +20,10 @@ %endif Name: php-%{gh_owner}-%{gh_project} -Version: 1.3.3 -Release: 7%{?dist} +Version: 2.2.2 +Release: 1%{?dist} Summary: Middleware for PHP -Group: Development/Libraries License: BSD URL: https://zendframework.github.io/%{gh_project}/ Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz @@ -36,8 +35,8 @@ BuildArch: noarch BuildRequires: php(language) >= 5.6 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-composer(psr/http-message) >= 1.0 with php-composer(psr/http-message) < 2) -Requires: (php-autoloader(%{gh_owner}/zend-escaper) >= 2.3 with php-autoloader(%{gh_owner}/zend-escaper) < 3) +BuildRequires: (php-composer(psr/http-message) >= 1.0 with php-composer(psr/http-message) < 2) +BuildRequires: (php-autoloader(%{gh_owner}/zend-escaper) >= 2.3 with php-autoloader(%{gh_owner}/zend-escaper) < 3) # remirepo:6 %else BuildRequires: php-composer(psr/http-message) < 2 @@ -45,14 +44,16 @@ BuildRequires: php-composer(psr/http-message) >= 1.0 BuildRequires: php-autoloader(%{gh_owner}/zend-escaper) < 3 BuildRequires: php-autoloader(%{gh_owner}/zend-escaper) >= 2.3 %endif -BuildRequires: php-composer(http-interop/http-middleware) >= 0.2 +BuildRequires: php-composer(http-interop/http-middleware) >= 0.5 +BuildRequires: php-composer(webimpress/http-middleware-compatibility) >= 0.1.4 BuildRequires: php-pcre BuildRequires: php-reflection BuildRequires: php-spl # From composer, "require-dev": { -# "zendframework/zend-diactoros": "^1.0", -# "phpunit/phpunit": "^5.6", -# "zendframework/zend-coding-standard": "~1.0.0" +# "malukenho/docheader": "^0.1.5", +# "phpunit/phpunit": "^5.7.22 || ^6.4.1", +# "zendframework/zend-coding-standard": "~1.0.0", +# "zendframework/zend-diactoros": "^1.0" # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-autoloader(%{gh_owner}/zend-diactoros) >= 1.0 with php-autoloader(%{gh_owner}/zend-diactoros) < 2) @@ -61,7 +62,7 @@ BuildRequires: (php-autoloader(%{gh_owner}/zend-diactoros) >= 1.0 with BuildRequires: php-autoloader(%{gh_owner}/zend-diactoros) < 2 BuildRequires: php-autoloader(%{gh_owner}/zend-diactoros) >= 1.0 %endif -BuildRequires: php-composer(phpunit/phpunit) >= 5.6 +BuildRequires: phpunit6 >= 6.4.1 %endif # Autoloader BuildRequires: php-fedora-autoloader-devel @@ -69,8 +70,8 @@ BuildRequires: php-fedora-autoloader-devel # From composer, "require": { # "php": "^5.6 || ^7.0", # "psr/http-message": "^1.0", -# "zendframework/zend-escaper": "^2.3", -# "http-interop/http-middleware": "^0.2.0" +# "webimpress/http-middleware-compatibility": "^0.1.4", +# "zendframework/zend-escaper": "^2.3" Requires: php(language) >= 5.6 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 @@ -83,7 +84,8 @@ Requires: php-composer(psr/http-message) < 2 Requires: php-autoloader(%{gh_owner}/zend-escaper) >= 2.3 Requires: php-autoloader(%{gh_owner}/zend-escaper) < 3 %endif -Requires: php-composer(http-interop/http-middleware) >= 0.2 +Requires: php-composer(http-interop/http-middleware) >= 0.5 +Requires: php-composer(webimpress/http-middleware-compatibility) >= 0.1.4 # From composer, "suggest": { # "psr/http-message-implementation": "Please install a psr/http-message-implementation to consume Stratigility; e.g., zendframework/zend-diactoros" %if 0%{?fedora} >= 21 || 0%{?rhel} >= 8 @@ -131,7 +133,10 @@ cat << 'EOF' | tee -a src/autoload.php \Fedora\Autoloader\Dependencies::required([ '%{php_home}/Psr/Http/Message/autoload.php', '%{php_home}/Zend/Escaper/autoload.php', - '%{php_home}/Interop/Http/Middleware/autoload.php', + '%{php_home}/webimpress/http-middleware-compatibility/autoload.php', + __DIR__ . "/functions/double-pass-middleware.php", + __DIR__ . "/functions/middleware.php", + __DIR__ . "/functions/path.php", ]); \Fedora\Autoloader\Dependencies::optional([ '%{php_home}/Zend/Diactoros/autoload.php', @@ -156,9 +161,9 @@ require_once '%{buildroot}%{php_home}/Zend/%{library}/autoload.php'; EOF ret=0 -for cmd in php php56 php70 php71 php72; do +for cmd in php php71 php72 php73 php74; do if which $cmd; then - $cmd %{_bindir}/phpunit --include-path=%{buildroot}%{php_home} || ret=1 + $cmd %{_bindir}/phpunit6 --include-path=%{buildroot}%{php_home} || ret=1 fi done exit $ret @@ -177,6 +182,13 @@ exit $ret %changelog +* Tue Jan 14 2020 Remi Collet - 2.2.2-1 +- update to 2.2.2 +- raise dependency on http-interop/http-middleware 0.5 +- add dependency on webimpress/http-middleware-compatibility +- switch to phpunit6 +- enable upstream test suite + * Thu Dec 6 2018 Remi Collet - 1.3.3-7 - use range dependencies - temporarily disable test suite -- cgit