From b45297334da2be5286d5c4a02875dd8384500229 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 25 Jan 2020 10:26:59 +0100 Subject: update to 1.2.1 switch to phpunit7 --- composer.json | 4 ++-- php-laminas-psr7bridge.spec | 28 ++++++++++++++-------------- test.patch | 24 ------------------------ 3 files changed, 16 insertions(+), 40 deletions(-) delete mode 100644 test.patch diff --git a/composer.json b/composer.json index 75ddb2b..f5120e8 100644 --- a/composer.json +++ b/composer.json @@ -29,13 +29,13 @@ "require": { "php": "^5.6 || ^7.0", "laminas/laminas-diactoros": "^1.7 || ^2.0", - "laminas/laminas-http": "^2.7", + "laminas/laminas-http": "^2.11", "laminas/laminas-zendframework-bridge": "^1.0", "psr/http-message": "^1.0" }, "require-dev": { "laminas/laminas-coding-standard": "~1.0.0", - "phpunit/phpunit": "^5.7.15 || ^6.5.6" + "phpunit/phpunit": "^5.7.15 || ^6.5.6 || ^7.5.20" }, "conflict": { "laminas/laminas-stdlib": "< 3.2.1" diff --git a/php-laminas-psr7bridge.spec b/php-laminas-psr7bridge.spec index cc55c0b..56eb0ba 100644 --- a/php-laminas-psr7bridge.spec +++ b/php-laminas-psr7bridge.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit 61ab5a9908a968c363b9562645a8a7e7ea086c22 +%global gh_commit 405b41b33a66f62787a675090804e0c085797766 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner laminas %global gh_project laminas-psr7bridge @@ -22,7 +22,7 @@ %endif Name: php-%{gh_project} -Version: 1.2.0 +Version: 1.2.1 Release: 1%{?dist} Summary: %{namespace} Framework %{library} component @@ -31,9 +31,6 @@ URL: https://github.com/%{gh_owner}/%{gh_project} Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh -# Nedd investigation -Patch0: test.patch - BuildArch: noarch # Tests %if %{with_tests} @@ -45,7 +42,7 @@ BuildRequires: php-spl # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-autoloader(%{gh_owner}/laminas-diactoros) >= 1.7 with php-autoloader(%{gh_owner}/laminas-diactoros) < 3) -BuildRequires: (php-autoloader(%{gh_owner}/laminas-http) >= 2.7 with php-autoloader(%{gh_owner}/laminas-http) < 3) +BuildRequires: (php-autoloader(%{gh_owner}/laminas-http) >= 2.11 with php-autoloader(%{gh_owner}/laminas-http) < 3) BuildRequires: (php-autoloader(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-autoloader(%{gh_owner}/laminas-zendframework-bridge) < 2) BuildRequires: (php-composer(psr/http-message) >= 1.0 with php-composer(psr/http-message) < 2) # remirepo:6 @@ -57,8 +54,8 @@ BuildRequires: php-psr-http-message %endif # From composer, "require-dev": { # "laminas/laminas-coding-standard": "~1.0.0", -# "phpunit/phpunit": "^5.7.15 || ^6.5.6" -BuildRequires: phpunit6 >= 6.5.6 +# "phpunit/phpunit": "^5.7.15 || ^6.5.6 || ^7.5.20" +BuildRequires: phpunit7 >= 7.5.20 %endif # Autoloader BuildRequires: php-fedora-autoloader-devel @@ -66,14 +63,14 @@ BuildRequires: php-fedora-autoloader-devel # From composer, "require": { # "php": "^5.6 || ^7.0", # "laminas/laminas-diactoros": "^1.7 || ^2.0", -# "laminas/laminas-http": "^2.7", +# "laminas/laminas-http": "^2.11", # "laminas/laminas-zendframework-bridge": "^1.0", # "psr/http-message": "^1.0" Requires: php(language) >= 5.6 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (php-autoloader(%{gh_owner}/laminas-diactoros) >= 1.7 with php-autoloader(%{gh_owner}/laminas-diactoros) < 3) -Requires: (php-autoloader(%{gh_owner}/laminas-http) >= 2.7 with php-autoloader(%{gh_owner}/laminas-http) < 3) +Requires: (php-autoloader(%{gh_owner}/laminas-http) >= 2.11 with php-autoloader(%{gh_owner}/laminas-http) < 3) Requires: (php-autoloader(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-autoloader(%{gh_owner}/laminas-zendframework-bridge) < 2) Requires: (php-composer(psr/http-message) >= 1.0 with php-composer(psr/http-message) < 2) # remirepo:6 @@ -90,8 +87,8 @@ Requires: php-pcre Requires: php-spl # Compatibily ensure by the bridge -Obsoletes: php-zendframework-%{zf_name} < 1.2.0-99 -Provides: php-zendframework-%{zf_name} = %{version}-99 +Obsoletes: php-zendframework-%{zf_name} < 1.2.1 +Provides: php-zendframework-%{zf_name} = %{version} Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} Provides: php-composer(zendframework/%{zf_name}) = %{version} Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version} @@ -106,7 +103,6 @@ Documentation: https://docs.laminas.dev/%{gh_project}/ %prep %setup -q -n %{gh_project}-%{gh_commit} -%patch0 -p0 -b .old mv LICENSE.md LICENSE @@ -164,7 +160,7 @@ exit (class_exists("\\Zend\\%{library}\\Psr7Response") ? 0 : 1); ret=0 for cmd in php php72 php73 php74; do if which $cmd; then - $cmd %{_bindir}/phpunit6 || ret=1 + $cmd %{_bindir}/phpunit7 || ret=1 fi done exit $ret @@ -184,6 +180,10 @@ exit $ret %changelog +* Sat Jan 25 2020 Remi Collet - 1.2.1-1 +- update to 1.2.1 +- switch to phpunit7 + * Fri Jan 10 2020 Remi Collet - 1.2.0-1 - switch to Laminas - update to 1.2.0 diff --git a/test.patch b/test.patch deleted file mode 100644 index 380272f..0000000 --- a/test.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up test/Psr7ResponseTest.php.old test/Psr7ResponseTest.php ---- test/Psr7ResponseTest.php.old 2020-01-10 15:11:11.847467126 +0100 -+++ test/Psr7ResponseTest.php 2020-01-10 15:11:34.953344291 +0100 -@@ -30,7 +30,7 @@ class Psr7ResponseTest extends TestCase - 'Content-Length' => [ '5' ] - ]], - [ 'Test!', 202, [ -- 'Content-Type' => [ 'text/html; level=1', 'text/html' ], -+ 'Content-Type' => [ 'text/html', 'text/html' ], - 'Content-Length' => [ '5' ] - ]], - ]; -diff -up test/Psr7ServerRequestTest.php.old test/Psr7ServerRequestTest.php ---- test/Psr7ServerRequestTest.php.old 2020-01-10 15:10:52.018572544 +0100 -+++ test/Psr7ServerRequestTest.php 2020-01-10 15:10:54.721558173 +0100 -@@ -401,7 +401,7 @@ class Psr7ServerRequestTest extends Test - 'POST', // http method - [ - 'Content-Type' => 'application/x-www-form-urlencoded', -- 'Cookie' => sprintf("PHPSESSID=%s;foo=bar", uniqid()) -+ 'Cookie' => sprintf("PHPSESSID=%s", uniqid()) - ], // headers - '', // body - [ 'foo' => 'bar' ], // query params -- cgit