From c9c5d19ccc8598c6e36431560e8c7dad578206a3 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 7 Feb 2020 10:47:54 +0100 Subject: update to 3.0.0 raise dependency on PHP 7.3 rename to php-phpunit-php-invoker3 move to /usr/share/php/SebastianBergmann/Invoker3 --- composer.json | 13 ++++++----- php-phpunit-php-invoker3.spec | 51 ++++++++++++++++++++++++++++--------------- 2 files changed, 41 insertions(+), 23 deletions(-) diff --git a/composer.json b/composer.json index 46b6ef3..ad82413 100644 --- a/composer.json +++ b/composer.json @@ -23,11 +23,11 @@ "sort-packages": true }, "require": { - "php": "^7.1", - "ext-pcntl": "*" + "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^6.5" + "ext-pcntl": "*", + "phpunit/phpunit": "^9.0" }, "autoload": { "classmap": [ @@ -36,12 +36,15 @@ }, "autoload-dev": { "classmap": [ - "tests/" + "tests/_fixture/" ] }, + "suggest": { + "ext-pcntl": "*" + }, "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } } } diff --git a/php-phpunit-php-invoker3.spec b/php-phpunit-php-invoker3.spec index 1b5ddfa..1753322 100644 --- a/php-phpunit-php-invoker3.spec +++ b/php-phpunit-php-invoker3.spec @@ -1,27 +1,33 @@ -# remirepo/fedora spec file for php-phpunit-php-invoker2 +# remirepo/fedora spec file for php-phpunit-php-invoker3 # -# Copyright (c) 2011-2018 Remi Collet +# Copyright (c) 2011-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit 4a01883f660b10d4a19a14de5efd19b22eac2d93 +%global gh_commit 7579d5a1ba7f3ac11c80004d205877911315ae7a %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sebastianbergmann %global gh_project php-invoker %global php_home %{_datadir}/php +# Packagist +%global pk_vendor phpunit +%global pk_project %{gh_project} +%global major 3 +# Namespace %global ns_vendor SebastianBergmann %global ns_project Invoker + %if %{bootstrap} %global with_tests %{?_with_tests:1}%{!?_with_tests:0} %else %global with_tests %{?_without_tests:0}%{!?_without_tests:1} %endif -Name: php-phpunit-php-invoker2 -Version: 2.0.0 +Name: php-%{pk_vendor}-%{pk_project}%{major} +Version: 3.0.0 Release: 1%{?dist} Summary: Invoke callables with a timeout @@ -30,25 +36,27 @@ URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz BuildArch: noarch -BuildRequires: php(language) >= 7.1 +BuildRequires: php(language) >= 7.3 BuildRequires: php-fedora-autoloader-devel %if %{with_tests} # From composer.json, require-dev -# "phpunit/phpunit": "^6.5" -BuildRequires: phpunit6 >= 6.5 +# "ext-pcntl": "*" +# "phpunit/phpunit": "^9.0" +BuildRequires: php-pcntl +# TODO test suite passes with v8, switch to v9 when available +BuildRequires: phpunit8 %endif # From composer.json, require -# "php": "^7.1", -# "ext-pcntl": "*" -Requires: php(language) >= 7.1 +# "php": "^7.3", +Requires: php(language) >= 7.3 +# From phpcompatinfo report for version 3.0.0 Requires: php-pcntl -# From phpcompatinfo report for version 2.0.0 Requires: php-spl # Autoloader Requires: php-composer(fedora/autoloader) -Provides: php-composer(phpunit/php-invoker) = %{version} +Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version} %description @@ -70,7 +78,7 @@ Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}/autoload.php %install mkdir -p %{buildroot}%{php_home}/%{ns_vendor} -cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project} +cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major} %if %{with_tests} @@ -81,10 +89,10 @@ mkdir vendor : Run upstream test suite ret=0 -for cmd in php php71 php72; do +for cmd in php php73 php74; do if which $cmd; then - $cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}/autoload.php \ - %{_bindir}/phpunit6 --verbose || ret=1 + $cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php \ + %{_bindir}/phpunit8 --verbose || ret=1 fi done exit $ret @@ -92,15 +100,22 @@ exit $ret %files +# remirepo:1 %{!?_licensedir:%global license %%doc} %license LICENSE %doc README.md %doc composer.json %dir %{php_home}/%{ns_vendor} - %{php_home}/%{ns_vendor}/%{ns_project} + %{php_home}/%{ns_vendor}/%{ns_project}%{major} %changelog +* Fri Feb 7 2020 Remi Collet - 3.0.0-1 +- update to 3.0.0 +- raise dependency on PHP 7.3 +- rename to php-phpunit-php-invoker3 +- move to /usr/share/php/SebastianBergmann/Invoker3 + * Mon Jan 29 2018 Remi Collet - 2.0.0-1 - Update to 2.0.0 - rename to php-phpunit-php-invoker2 -- cgit