summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-12-19 09:13:53 +0100
committerRemi Collet <remi@remirepo.net>2019-12-19 09:13:53 +0100
commitfec9ba49349aa7fb217de57ecb4fe5b9f061f6ec (patch)
treefed9806a24ddbdedec95ad89e2fdc42afa88b9b2
parentd9301f2af656439fea31f2e082d7399840dcaa00 (diff)
v1.6.1 from Fedora
-rw-r--r--.gitignore16
-rw-r--r--composer.json18
l---------makesrc.sh1
-rw-r--r--php-guzzlehttp-psr7.spec87
4 files changed, 95 insertions, 27 deletions
diff --git a/.gitignore b/.gitignore
index 502ee0e..fc9aa8c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,8 @@
-/php-guzzlehttp-psr7-1.1.0-af0e1758de355eb113917ad79c3c0e3604bce4bd.tar.gz
-/php-guzzlehttp-psr7-1.2.0-4ef919b0cf3b1989523138b60163bbcb7ba1ff7e.tar.gz
-/php-guzzlehttp-psr7-1.2.1-4d0bdbe1206df7440219ce14c972aa57cc5e4982.tar.gz
-/php-guzzlehttp-psr7-1.2.3-2e89629ff057ebb49492ba08e6995d3a6a80021b.tar.gz
-/php-guzzlehttp-psr7-1.3.0-31382fef2889136415751badebbd1cb022a4ed72.tar.gz
-/php-guzzlehttp-psr7-1.3.1-5c6447c9df362e8f8093bda8f5d8873fe5c7f65b.tar.gz
-/php-guzzlehttp-psr7-1.4.1-0d6c7ca039329247e4f0f8f8f6506810e8248855.tar.gz
-/php-guzzlehttp-psr7-1.4.2-f5b8a8512e2b58b0071a7280e39f14f72e05d87c.tar.gz
+clog
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/composer.json b/composer.json
index b1c5a90..168a055 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
"name": "guzzlehttp/psr7",
"type": "library",
"description": "PSR-7 message implementation that also provides common utility methods",
- "keywords": ["request", "response", "message", "stream", "http", "uri", "url"],
+ "keywords": ["request", "response", "message", "stream", "http", "uri", "url", "psr-7"],
"license": "MIT",
"authors": [
{
@@ -17,23 +17,33 @@
],
"require": {
"php": ">=5.4.0",
- "psr/http-message": "~1.0"
+ "psr/http-message": "~1.0",
+ "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.0"
+ "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8",
+ "ext-zlib": "*"
},
"provide": {
"psr/http-message-implementation": "1.0"
},
+ "suggest": {
+ "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
+ },
"autoload": {
"psr-4": {
"GuzzleHttp\\Psr7\\": "src/"
},
"files": ["src/functions_include.php"]
},
+ "autoload-dev": {
+ "psr-4": {
+ "GuzzleHttp\\Tests\\Psr7\\": "tests/"
+ }
+ },
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "1.6-dev"
}
}
}
diff --git a/makesrc.sh b/makesrc.sh
new file mode 120000
index 0000000..21511ef
--- /dev/null
+++ b/makesrc.sh
@@ -0,0 +1 @@
+php-guzzlehttp-psr7-get-source.sh \ No newline at end of file
diff --git a/php-guzzlehttp-psr7.spec b/php-guzzlehttp-psr7.spec
index 660c05a..b5bc593 100644
--- a/php-guzzlehttp-psr7.spec
+++ b/php-guzzlehttp-psr7.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-guzzlehttp-psr7
#
-# Copyright (c) 2015-2017 Shawn Iwinski <shawn.iwinski@gmail.com>
+# Copyright (c) 2015-2019 Shawn Iwinski <shawn.iwinski@gmail.com>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,8 +12,8 @@
%global github_owner guzzle
%global github_name psr7
-%global github_version 1.4.2
-%global github_commit f5b8a8512e2b58b0071a7280e39f14f72e05d87c
+%global github_version 1.6.1
+%global github_commit 239400de7a173fe9901b9ac7c06497751f00727a
%global composer_vendor guzzlehttp
%global composer_project psr7
@@ -23,10 +23,29 @@
# "psr/http-message": "~1.0"
%global psr_http_message_min_ver 1.0
%global psr_http_message_max_ver 2.0
+# "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
+%global ralouphie_getallheaders_min_ver 2.0.5
+%global ralouphie_getallheaders_max_ver 4.0
# Build using "--without tests" to disable tests
%global with_tests 0%{!?_without_tests:1}
+# Range dependencies supported?
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+%global with_range_dependencies 1
+%else
+%global with_range_dependencies 0
+%endif
+
+# PHPUnit
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+%global phpunit_require phpunit6
+%global phpunit_exec phpunit6
+%else
+%global phpunit_require php-composer(phpunit/phpunit)
+%global phpunit_exec phpunit
+%endif
+
%{!?phpdir: %global phpdir %{_datadir}/php}
Name: php-%{composer_vendor}-%{composer_project}
@@ -34,7 +53,6 @@ Version: %{github_version}
Release: 1%{?github_release}%{?dist}
Summary: PSR-7 message implementation
-Group: Development/Libraries
License: MIT
URL: https://github.com/%{github_owner}/%{github_name}
@@ -48,24 +66,43 @@ BuildArch: noarch
%if %{with_tests}
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
-BuildRequires: php-composer(phpunit/phpunit)
+BuildRequires: php-zlib
+BuildRequires: %{phpunit_require}
+%if %{with_range_dependencies}
+BuildRequires: (php-composer(psr/http-message) >= %{psr_http_message_min_ver} with php-composer(psr/http-message) < %{psr_http_message_max_ver})
+BuildRequires: (php-composer(ralouphie/getallheaders) >= %{ralouphie_getallheaders_min_ver} with php-composer(ralouphie/getallheaders) < %{ralouphie_getallheaders_max_ver})
+%else
BuildRequires: php-composer(psr/http-message) < %{psr_http_message_max_ver}
BuildRequires: php-composer(psr/http-message) >= %{psr_http_message_min_ver}
-## phpcompatinfo (computed from version 1.4.2)
+BuildRequires: php-composer(ralouphie/getallheaders) < %{ralouphie_getallheaders_max_ver}
+BuildRequires: php-composer(ralouphie/getallheaders) >= %{ralouphie_getallheaders_min_ver}
+%endif
+## phpcompatinfo (computed from version 1.6.1)
+BuildRequires: php-filter
BuildRequires: php-hash
+BuildRequires: php-libxml
BuildRequires: php-pcre
BuildRequires: php-reflection
BuildRequires: php-spl
-BuildRequires: php-zlib
+BuildRequires: php-xmlreader
+BuildRequires: php-xmlwriter
## Autoloader
BuildRequires: php-composer(fedora/autoloader)
%endif
# composer.json
Requires: php(language) >= %{php_min_ver}
+%if %{with_range_dependencies}
+Requires: (php-composer(psr/http-message) >= %{psr_http_message_min_ver} with php-composer(psr/http-message) < %{psr_http_message_max_ver})
+Requires: (php-composer(ralouphie/getallheaders) >= %{ralouphie_getallheaders_min_ver} with php-composer(ralouphie/getallheaders) < %{ralouphie_getallheaders_max_ver})
+%else
Requires: php-composer(psr/http-message) < %{psr_http_message_max_ver}
Requires: php-composer(psr/http-message) >= %{psr_http_message_min_ver}
-# phpcompatinfo (computed from version 1.4.2)
+Requires: php-composer(ralouphie/getallheaders) < %{ralouphie_getallheaders_max_ver}
+Requires: php-composer(ralouphie/getallheaders) >= %{ralouphie_getallheaders_min_ver}
+%endif
+# phpcompatinfo (computed from version 1.6.1)
+Requires: php-filter
Requires: php-hash
Requires: php-pcre
Requires: php-spl
@@ -80,6 +117,8 @@ Provides: php-composer(psr/http-message-implementation) = 1.0
PSR-7 message implementation, several stream decorators, and some helpful
functionality like query string parsing.
+Autoloader: %{phpdir}/GuzzleHttp/Psr7/autoload.php
+
%prep
%setup -qn %{github_name}-%{github_commit}
@@ -96,27 +135,40 @@ cat <<'AUTOLOAD' | tee src/autoload.php
require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('GuzzleHttp\\Psr7\\', __DIR__);
-require_once __DIR__.'/functions_include.php';
\Fedora\Autoloader\Dependencies::required([
+ __DIR__.'/functions_include.php',
'%{phpdir}/Psr/Http/Message/autoload.php',
+ '%{phpdir}/ralouphie-getallheaders/autoload.php',
]);
AUTOLOAD
%install
-mkdir -p %{buildroot}%{phpdir}/GuzzleHttp/Psr7
-cp -rp src/* %{buildroot}%{phpdir}/GuzzleHttp/Psr7/
+mkdir -p %{buildroot}%{phpdir}/GuzzleHttp
+cp -rp src %{buildroot}%{phpdir}/GuzzleHttp/Psr7
%check
%if %{with_tests}
+: Create tests bootstrap
+cat <<'BOOTSTRAP' | tee bootstrap.php
+<?php
+require '%{buildroot}%{phpdir}/GuzzleHttp/Psr7/autoload.php';
+
+\Fedora\Autoloader\Autoload::addPsr4('GuzzleHttp\\Tests\\Psr7\\', __DIR__.'/tests');
+
+if (!class_exists('PHPUnit\\Framework\\Error\\Warning')) {
+ class_alias('PHPUnit_Framework_Error_Warning', 'PHPUnit\\Framework\\Error\\Warning');
+}
+BOOTSTRAP
+
: Upstream tests
RETURN_CODE=0
-for PHP_EXEC in php %{?rhel:php55} php56 php70 php71; do
- if [ "php" == "$PHP_EXEC" ] || which $PHP_EXEC; then
- $PHP_EXEC %{_bindir}/phpunit --verbose \
- --bootstrap %{buildroot}%{phpdir}/GuzzleHttp/Psr7/autoload.php \
+PHPUNIT=$(which %{phpunit_exec})
+for PHP_EXEC in "" %{?rhel:php55 php70 php71} php72 php73 php74; do
+ if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
+ $PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
|| RETURN_CODE=1
fi
done
@@ -136,6 +188,11 @@ exit $RETURN_CODE
%changelog
+* Tue Dec 17 2019 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.6.1-1
+- Update to 1.6.1 (RHBZ #1727190)
+- Conditionally use range dependencies
+- Conditionally use PHPUnit 6
+
* Sat Apr 08 2017 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.4.2-1
- Updated to 1.4.2 (RHBZ #1434198)
- Don't use autoloader to load functions include