From 0bac77ba6bec2d205ef9a6fd98cca65fd147cf7c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 10 Apr 2020 07:39:54 +0200 Subject: v1.3.0 from Fedora --- composer.json | 10 ++-- php-symfony-psr-http-message-bridge.spec | 89 +++++++++++++++++++++++--------- 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 +# Copyright (c) 2015-2020 Shawn Iwinski # # 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 - 1.3.0-1 +- Update to 1.3.0 (RHBZ #1687504) +- Use PHPUnit 8 + * Wed May 15 2019 Shawn Iwinski - 1.1.2-1 - Update to 1.1.2 - Remove php-composer(zendframework/zend-diactoros) interoperability (no longer -- cgit