diff options
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | composer.json | 13 | ||||
l--------- | makesrc.sh | 1 | ||||
-rw-r--r-- | php-guzzlehttp-promises.spec | 46 |
4 files changed, 44 insertions, 25 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..01f0400 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +clog +package-*.xml +*.tgz +*.tar.bz2 +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/composer.json b/composer.json index ec41a61..db44d9e 100644 --- a/composer.json +++ b/composer.json @@ -11,10 +11,10 @@ } ], "require": { - "php": ">=5.5.0" + "php": ">=5.5" }, "require-dev": { - "phpunit/phpunit": "^4.0" + "symfony/phpunit-bridge": "^4.4 || ^5.1" }, "autoload": { "psr-4": { @@ -22,9 +22,14 @@ }, "files": ["src/functions_include.php"] }, + "autoload-dev": { + "psr-4": { + "GuzzleHttp\\Promise\\Tests\\": "tests/" + } + }, "scripts": { - "test": "vendor/bin/phpunit", - "test-ci": "vendor/bin/phpunit --coverage-text" + "test": "vendor/bin/simple-phpunit", + "test-ci": "vendor/bin/simple-phpunit --coverage-text" }, "extra": { "branch-alias": { diff --git a/makesrc.sh b/makesrc.sh new file mode 120000 index 0000000..f2f5345 --- /dev/null +++ b/makesrc.sh @@ -0,0 +1 @@ +php-guzzlehttp-promises-get-source.sh
\ No newline at end of file diff --git a/php-guzzlehttp-promises.spec b/php-guzzlehttp-promises.spec index bbb6f3f..3090e38 100644 --- a/php-guzzlehttp-promises.spec +++ b/php-guzzlehttp-promises.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-guzzlehttp-promises # -# Copyright (c) 2015-2016 Shawn Iwinski <shawn.iwinski@gmail.com> +# Copyright (c) 2015-2021 Shawn Iwinski <shawn.iwinski@gmail.com> # # License: MIT # http://opensource.org/licenses/MIT @@ -10,19 +10,18 @@ # Please preserve changelog entries # +%bcond_without tests + %global github_owner guzzle %global github_name promises -%global github_version 1.3.1 -%global github_commit a59da6cf61d80060647ff4d3eb2c03a2bc694646 +%global github_version 1.4.1 +%global github_commit 8e7d04f1f6450fef59366c399cfad4b9383aa30d %global composer_vendor guzzlehttp %global composer_project promises -# "php": ">=5.5.0" -%global php_min_ver 5.5.0 - -# Build using "--without tests" to disable tests -%global with_tests 0%{!?_without_tests:1} +# "php": ">=5.5" +%global php_min_ver 5.5 %{!?phpdir: %global phpdir %{_datadir}/php} @@ -43,21 +42,21 @@ Source1: %{name}-get-source.sh BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch # Tests -%if %{with_tests} +%if %{with tests} ## composer.json BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: php-composer(phpunit/phpunit) -## phpcompatinfo (computed from version 1.3.1) +BuildRequires: phpunit9 +## phpcompatinfo (computed from version 1.4.1) BuildRequires: php-json BuildRequires: php-reflection BuildRequires: php-spl +%endif ## Autoloader BuildRequires: php-composer(fedora/autoloader) -%endif # composer.json Requires: php(language) >= %{php_min_ver} -# phpcompatinfo (computed from version 1.3.1) +# phpcompatinfo (computed from version 1.4.1) Requires: php-json Requires: php-spl # Autoloader @@ -106,18 +105,19 @@ cp -rp src/* %{buildroot}%{phpdir}/GuzzleHttp/Promise/ %check -%if %{with_tests} -sed "s#require.*autoload.*#require '%{buildroot}%{phpdir}/GuzzleHttp/Promise/autoload.php';#" \ - -i tests/bootstrap.php - -: Upstream tests -%{_bindir}/phpunit --verbose +%if %{with tests} +mkdir vendor +cat << 'EOF' | tee vendor/autoload.php +<?php +require "%{buildroot}%{phpdir}/GuzzleHttp/Promise/autoload.php"; +\Fedora\Autoloader\Autoload::addPsr4('GuzzleHttp\\Promise\\Tests\\', dirname(__DIR__).'/tests'); +EOF : Upstream tests with SCLs if available SCL_RETURN_CODE=0 -for SCL in php56 php70 php71; do +for SCL in php php73 php74 php80; do if which $SCL; then - $SCL %{_bindir}/phpunit || SCL_RETURN_CODE=1 + $SCL %{_bindir}/phpunit9 || SCL_RETURN_CODE=1 fi done exit $SCL_RETURN_CODE @@ -141,6 +141,10 @@ rm -rf %{buildroot} %changelog +* Wed Mar 31 2021 Remi Collet <remi@remirepo.net> - 1.4.1-1 +- update to 1.4.1 +- switch to phpunit9 + * Wed Dec 07 2016 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.3.1-1 - Updated to 1.3.1 (RHBZ #1406764) - Run upstream tests with SCLs if they are available |