diff options
Diffstat (limited to 'php-ramsey-collection.spec')
-rw-r--r-- | php-ramsey-collection.spec | 57 |
1 files changed, 39 insertions, 18 deletions
diff --git a/php-ramsey-collection.spec b/php-ramsey-collection.spec index 0da3295..cb69c5c 100644 --- a/php-ramsey-collection.spec +++ b/php-ramsey-collection.spec @@ -10,7 +10,7 @@ %bcond_without tests # Github -%global gh_commit ab2237657ad99667a5143e32ba2683c8029563d4 +%global gh_commit eaca1dc1054ddd10cbd83c1461907bee6fb528fa %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner ramsey %global gh_project collection @@ -22,7 +22,7 @@ %global ns_project Collection Name: php-%{pk_vendor}-%{pk_name} -Version: 1.1.4 +Version: 1.2.1 Release: 1%{?dist} Summary: Library for representing and manipulating collections @@ -34,7 +34,7 @@ Source1: makesrc.sh BuildArch: noarch -BuildRequires: php(language) >= 7.2 +BuildRequires: php(language) >= 7.3 BuildRequires: php-date BuildRequires: php-spl # From composer.json, "require-dev": { @@ -45,6 +45,7 @@ BuildRequires: php-spl # "hamcrest/hamcrest-php": "^2", # "jangregor/phpstan-prophecy": "^0.8",, # "mockery/mockery": "^1.3", +# "phpspec/prophecy-phpunit": "^2.0", # "phpstan/extension-installer": "^1", # "phpstan/phpstan": "^0.12.32", # "phpstan/phpstan-mockery": "^0.12.5", @@ -55,31 +56,38 @@ BuildRequires: php-spl # "squizlabs/php_codesniffer": "^3.5", # "vimeo/psalm": "^4.4" %if %{with tests} -%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9 BuildRequires: phpunit9 %global phpunit %{_bindir}/phpunit9 -%else -BuildRequires: phpunit8 >= 8.5 -%global phpunit %{_bindir}/phpunit8 -%endif # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-composer(fzaninotto/faker) >= 1.5 with php-composer(fzaninotto/faker) < 2) -BuildRequires: (php-composer(hamcrest/hamcrest-php) >= 2 with php-composer(hamcrest/hamcrest-php) < 3) -BuildRequires: (php-composer(mockery/mockery) >= 1.3 with php-composer(mockery/mockery) < 2) -# remirepo:5 +BuildRequires: (php-composer(symfony/polyfill-php81) >= 1.23 with php-composer(symfony/polyfill-php81) < 2) +BuildRequires: (php-composer(fzaninotto/faker) >= 1.5 with php-composer(fzaninotto/faker) < 2) +BuildRequires: (php-composer(hamcrest/hamcrest-php) >= 2 with php-composer(hamcrest/hamcrest-php) < 3) +BuildRequires: (php-composer(mockery/mockery) >= 1.3 with php-composer(mockery/mockery) < 2) +BuildRequires: (php-composer(phpspec/prophecy-phpunit) >= 2.0 with php-composer(phpspec/prophecy-phpunit) < 3) +# remirepo:7 %else -BuildRequires: php-Faker >= 1.5 -BuildRequires: php-hamcrest2 >= 2 -BuildRequires: php-mockery >= 1.3 +BuildRequires: php-Faker >= 1.5 +BuildRequires: php-hamcrest2 >= 2 +BuildRequires: php-mockery >= 1.3 +BuildRequires: php-phpspec-prophecy-phpunit >= 2.0 +BuildRequires: php-symfony-polyfill >= 1.23 %endif %endif # Autoloader BuildRequires: php-fedora-autoloader-devel # From composer.json, "require": { -# "php": "^7.2 || ^8" -Requires: php(language) >= 7.2 +# "php": "^7.3 || ^8", +# "symfony/polyfill-php81": "^1.23" +Requires: php(language) >= 7.3 +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-composer(symfony/polyfill-php81) >= 1.23 with php-composer(symfony/polyfill-php81) < 2) +# remirepo:3 +%else +Requires: php-symfony-polyfill >= 1.23 +%endif # From phpcompatifo report for 1.1.1 Requires: php-spl @@ -107,6 +115,12 @@ phpab \ --template fedora \ --output src/autoload.php \ src +cat << 'EOF' | tee -a src/autoload.php + +\Fedora\Autoloader\Dependencies::required([ + '%{_datadir}/php/Symfony/Polyfill/autoload.php', +]); +EOF %install @@ -124,16 +138,18 @@ cat << 'EOF' | tee vendor/autoload.php require '%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('Ramsey\\Console\\', dirname(__DIR__) . '/resources/console'); \Fedora\Autoloader\Autoload::addPsr4('Ramsey\\Collection\\Test\\', dirname(__DIR__) . '/tests'); +\Fedora\Autoloader\Autoload::addPsr4('Ramsey\\Test\\Generics\\', dirname(__DIR__) . '/tests/generics'); \Fedora\Autoloader\Dependencies::required([ '%{_datadir}/php/Faker/autoload.php', '%{_datadir}/php/Hamcrest2/autoload.php', '%{_datadir}/php/Mockery1/autoload.php', + '%{_datadir}/php/Prophecy/PhpUnit/autoload.php', ]); EOF : Run upstream test suite ret=0 -for cmdarg in "php %{phpunit}" php73 php74 php80 php81; do +for cmdarg in "php %{phpunit}" php73 php74 php80 php81; do if which $cmdarg; then set $cmdarg $1 ${2:- %{_bindir}/phpunit9} \ @@ -156,6 +172,11 @@ exit $ret %changelog +* Fri Aug 6 2021 Remi Collet <remi@remirepo.net> - 1.2.1-1 +- update to 1.2.1 +- raise dependency on PHP 7.3 +- add dependency on symfony/polyfill-php81 + * Fri Jul 30 2021 Remi Collet <remi@remirepo.net> - 1.1.4-1 - update to 1.1.4 |