From d612e5e5d91a6e6f6e07c4d1a959067a08832ac7 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 31 Mar 2021 12:08:55 +0200 Subject: update to 2.3.0 raise dependency on PHP 7.3 switch to phpunit9 --- composer.json | 6 ++++-- php-di-invoker.spec | 47 ++++++++++++++++++++++++++++------------------- 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/composer.json b/composer.json index 36b9f0b..d4f8711 100644 --- a/composer.json +++ b/composer.json @@ -16,10 +16,12 @@ } }, "require": { + "php": ">=7.3", "psr/container": "~1.0" }, "require-dev": { - "phpunit/phpunit": "~4.5", - "athletic/athletic": "~0.1.8" + "phpunit/phpunit": "^9.0", + "athletic/athletic": "~0.1.8", + "mnapoli/hard-mode": "~0.3.0" } } diff --git a/php-di-invoker.spec b/php-di-invoker.spec index 2a1d4dd..8c59649 100644 --- a/php-di-invoker.spec +++ b/php-di-invoker.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-di-invoker # -# Copyright (c) 2016-2019 Shawn Iwinski +# Copyright (c) 2016-2021 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -10,21 +10,22 @@ # Please preserve changelog entries # +%bcond_without tests + %global github_owner PHP-DI %global github_name Invoker -%global github_version 2.0.0 -%global github_commit 540c27c86f663e20fe39a24cd72fa76cdb21d41a +%global github_version 2.3.0 +%global github_commit 992fec6c56f2d1ad1ad5fee28267867c85bfb8f9 %global composer_vendor php-di %global composer_project invoker +# "php": "^7.1 || ^8.0" +%global php_min_ver 7.3 # "psr/container": "~1.0" %global psr_container_min_ver 1.0 %global psr_container_max_ver 2.0 -# Build using "--without tests" to disable tests -%global with_tests 0%{!?_without_tests:1} - %{!?phpdir: %global phpdir %{_datadir}/php} Name: %{composer_vendor}-%{composer_project} @@ -42,31 +43,33 @@ Source1: %{name}-get-source.sh BuildArch: noarch # Tests -%if %{with_tests} +%if %{with tests} ## composer.json +BuildRequires: php(language) >= %{php_min_ver} +# remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-composer(psr/container) >= %{psr_container_min_ver} with php-composer(psr/container) < %{psr_container_max_ver}) +BuildRequires:(php-composer(psr/container) >= %{psr_container_min_ver} with php-composer(psr/container) < %{psr_container_max_ver}) +# remirepo:3 %else -BuildRequires: php-composer(psr/container) < %{psr_container_max_ver} -BuildRequires: php-composer(psr/container) >= %{psr_container_min_ver} +BuildRequires: php-psr-container %endif -BuildRequires: php-composer(phpunit/phpunit) +BuildRequires: phpunit9 ## phpcompatinfo (computed from version 2.0.0) -BuildRequires: php(language) >= 5.3.0 BuildRequires: php-reflection ## Autoloader BuildRequires: php-composer(fedora/autoloader) %endif # composer.json +Requires: php(language) >= %{php_min_ver} +# remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-composer(psr/container) >= %{psr_container_min_ver} with php-composer(psr/container) < %{psr_container_max_ver}) +Requires: (php-composer(psr/container) >= %{psr_container_min_ver} with php-composer(psr/container) < %{psr_container_max_ver}) +# remirepo:3 %else -Requires: php-composer(psr/container) >= %{psr_container_min_ver} -Requires: php-composer(psr/container) < %{psr_container_max_ver} +Requires: php-psr-container %endif # phpcompatinfo (computed from version 2.0.0) -Requires: php(language) >= 5.3.0 Requires: php-reflection # Autoloader Requires: php-composer(fedora/autoloader) @@ -110,7 +113,7 @@ cp -rp src/* %{buildroot}%{phpdir}/Invoker/ %check -%if %{with_tests} +%if %{with tests} : Create tests bootstrap cat <<'BOOTSTRAP' | tee bootstrap.php - 2.3.0-1 +- update to 2.3.0 +- raise dependency on PHP 7.3 +- switch to phpunit9 + * Sun May 26 2019 Shawn Iwinski - 2.0.0-1 - Update to 2.0.0 (RHBZ #1434817) - Add range version dependencies for Fedora >= 27 || RHEL >= 8 -- cgit