summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-04-10 07:39:54 +0200
committerRemi Collet <remi@remirepo.net>2020-04-10 07:39:54 +0200
commit0bac77ba6bec2d205ef9a6fd98cca65fd147cf7c (patch)
tree29e6f46dfd27617c2381df77dc179390cbea9314
parent9056ca861976b8194c631a17204cc05d680a7713 (diff)
v1.3.0 from FedoraHEADmaster
-rw-r--r--composer.json10
-rw-r--r--php-symfony-psr-http-message-bridge.spec89
2 files changed, 70 insertions, 29 deletions
diff --git a/composer.json b/composer.json
index c1eb5fb..07ed9cf 100644
--- a/composer.json
+++ b/composer.json
@@ -16,12 +16,14 @@
}
],
"require": {
- "php": "^5.3.3 || ^7.0",
+ "php": "^7.1",
"psr/http-message": "^1.0",
- "symfony/http-foundation": "^2.3.42 || ^3.4 || ^4.0"
+ "symfony/http-foundation": "^4.4 || ^5.0"
},
"require-dev": {
- "symfony/phpunit-bridge": "^3.4 || ^4.0"
+ "symfony/phpunit-bridge": "^4.4 || ^5.0",
+ "nyholm/psr7": "^1.1",
+ "zendframework/zend-diactoros": "^1.4.1 || ^2.0"
},
"suggest": {
"nyholm/psr7": "For a super lightweight PSR-7/17 implementation"
@@ -34,7 +36,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "1.1-dev"
+ "dev-master": "1.3-dev"
}
}
}
diff --git a/php-symfony-psr-http-message-bridge.spec b/php-symfony-psr-http-message-bridge.spec
index 14b98fb..20942eb 100644
--- a/php-symfony-psr-http-message-bridge.spec
+++ b/php-symfony-psr-http-message-bridge.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-symfony-psr-http-message-bridge
#
-# Copyright (c) 2015-2019 Shawn Iwinski <shawn.iwinski@gmail.com>
+# Copyright (c) 2015-2020 Shawn Iwinski <shawn.iwinski@gmail.com>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,28 +12,37 @@
%global github_owner symfony
%global github_name psr-http-message-bridge
-%global github_version 1.1.2
-%global github_commit a33352af16f78a5ff4f9d90811536abf210df12b
+%global github_version 1.3.0
+%global github_commit 9d3e80d54d9ae747ad573cad796e8e247df7b796
%global composer_vendor symfony
%global composer_project psr-http-message-bridge
-# "php": "^5.3.3 || ^7.0"
-%global php_min_ver 5.3.3
+# "php": "^7.1"
+%global php_min_ver 7.1
+# "nyholm/psr7": "^1.1"
+%global nyholm_psr7_min_ver 1.1
+%global nyholm_psr7_max_ver 2.0
# "psr/http-message": "^1.0"
%global psr_http_message_min_ver 1.0
%global psr_http_message_max_ver 2.0
-# "symfony/http-foundation": "^2.3.42 || ^3.4 || ^4.0"
-%global symfony_min_ver %{?el6:2.3.42}%{!?el6:2.7.1}
-%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-%global symfony_max_ver 5.0
-%else
-%global symfony_max_ver 4.0
-%endif
+# "symfony/http-foundation": "^4.4 || ^5.0"
+%global symfony_min_ver 4.4
+%global symfony_max_ver 6.0
+# "zendframework/zend-diactoros": "^1.4.1 || ^2.0"
+%global zend_diactoros_min_ver 1.4.1
+%global zend_diactoros_max_ver 3.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
+
%{!?phpdir: %global phpdir %{_datadir}/php}
Name: php-%{composer_vendor}-%{composer_project}
@@ -48,17 +57,23 @@ Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{githu
BuildArch: noarch
# Tests
%if %{with_tests}
-BuildRequires: php-composer(phpunit/phpunit)
+BuildRequires: phpunit8
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
-%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+%if %{with_range_dependencies}
+BuildRequires: (php-composer(nyholm/psr7) >= %{nyholm_psr7_min_ver} with php-composer(nyholm/psr7) < %{nyholm_psr7_max_ver})
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(symfony/http-foundation) >= %{symfony_min_ver} with php-composer(symfony/http-foundation) < %{symfony_max_ver})
+BuildRequires: (php-composer(zendframework/zend-diactoros) >= %{zend_diactoros_min_ver} with php-composer(zendframework/zend-diactoros) < %{zend_diactoros_max_ver})
%else
+BuildRequires: php-composer(nyholm/psr7) < %{nyholm_psr7_max_ver}
+BuildRequires: php-composer(nyholm/psr7) >= %{nyholm_psr7_min_ver}
BuildRequires: php-composer(psr/http-message) < %{psr_http_message_max_ver}
BuildRequires: php-composer(psr/http-message) >= %{psr_http_message_min_ver}
BuildRequires: php-composer(symfony/http-foundation) < %{symfony_max_ver}
-#BuildRequires: php-composer(symfony/http-foundation) >= %%{symfony_min_ver}
+BuildRequires: php-composer(symfony/http-foundation) >= %{symfony_min_ver}
+BuildRequires: php-composer(zendframework/zend-diactoros) < %{zend_diactoros_max_ver}
+BuildRequires: php-composer(zendframework/zend-diactoros) >= %{zend_diactoros_min_ver}
%endif
## phpcompatinfo (computed from version 1.1.2)
BuildRequires: php-date
@@ -70,14 +85,14 @@ BuildRequires: php-composer(fedora/autoloader)
# composer.json
Requires: php(language) >= %{php_min_ver}
-%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+%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(symfony/http-foundation) >= %{symfony_min_ver} with php-composer(symfony/http-foundation) < %{symfony_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}
Requires: php-composer(symfony/http-foundation) < %{symfony_max_ver}
-#Requires: php-composer(symfony/http-foundation) >= %%{symfony_min_ver}
+Requires: php-composer(symfony/http-foundation) >= %{symfony_min_ver}
%endif
# phpcompatinfo (computed from version 1.1.2)
Requires: php-date
@@ -85,6 +100,12 @@ Requires: php-spl
# Autoloader
Requires: php-composer(fedora/autoloader)
+%if %{with_range_dependencies}
+# Weak dependencies
+## composer.json
+Suggests: php-composer(nyholm/psr7)
+%endif
+
# Composer
Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version}
@@ -110,14 +131,16 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Symfony\\Bridge\\PsrHttpMessage\\', __DIR__);
-\Fedora\Autoloader\Dependencies::required(array(
+\Fedora\Autoloader\Dependencies::required([
'%{phpdir}/Psr/Http/Message/autoload.php',
- array(
+ [
+ '%{phpdir}/Symfony5/Component/HttpFoundation/autoload.php',
'%{phpdir}/Symfony4/Component/HttpFoundation/autoload.php',
- '%{phpdir}/Symfony3/Component/HttpFoundation/autoload.php',
- '%{phpdir}/Symfony/Component/HttpFoundation/autoload.php',
- ),
-));
+ ],
+]);
+\Fedora\Autoloader\Dependencies::optional([
+ '%{phpdir}/Nyholm/Psr7/autoload.php',
+]);
AUTOLOAD
@@ -132,15 +155,27 @@ cp -rp *.php Factory Tests %{buildroot}%{phpdir}/Symfony/Bridge/PsrHttpMessage/
cat <<'BOOTSTRAP' | tee -a bootstrap.php
<?php
require_once '%{buildroot}%{phpdir}/Symfony/Bridge/PsrHttpMessage/autoload.php';
+
+\Fedora\Autoloader\Autoload::addPsr4('Symfony\\Bridge\\PsrHttpMessage\\Tests\\', __DIR__.'/Tests');
+
+\Fedora\Autoloader\Dependencies::required([
+ [
+ '%{phpdir}/Zend/Diactoros2/autoload.php',
+ '%{phpdir}/Zend/Diactoros/autoload.php',
+ ],
+]);
+
+/*
if (!class_exists('PHPUnit\\Framework\\TestCase')) {
class_alias('PHPUnit_Framework_TestCase', 'PHPUnit\\Framework\\TestCase');
}
+*/
BOOTSTRAP
: Upstream tests
RETURN_CODE=0
-PHPUNIT=$(which phpunit)
-for PHP_EXEC in "" %{?rhel:php54 php55 php56 php70} php71 php72 php73 php74; do
+PHPUNIT=$(which phpunit8)
+for PHP_EXEC in "" php72 php73 php74; do
if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
$PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
|| RETURN_CODE=1
@@ -162,6 +197,10 @@ exit $RETURN_CODE
%changelog
+* Wed Apr 08 2020 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.3.0-1
+- Update to 1.3.0 (RHBZ #1687504)
+- Use PHPUnit 8
+
* Wed May 15 2019 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.1.2-1
- Update to 1.1.2
- Remove php-composer(zendframework/zend-diactoros) interoperability (no longer