summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-08-06 09:11:27 +0200
committerRemi Collet <remi@remirepo.net>2021-08-06 09:11:27 +0200
commit268b49eb75211d6ae5430c651d0e457d8e48b7a2 (patch)
treed7cd51cac4e5b1e5745cc7256ea062f228b4914f
parent957c27a27d4b3f7c9c06411d5911626c9578d262 (diff)
update to 1.2.1
raise dependency on PHP 7.3 add dependency on symfony/polyfill-php81
-rw-r--r--composer.json9
-rw-r--r--php-ramsey-collection.spec57
2 files changed, 45 insertions, 21 deletions
diff --git a/composer.json b/composer.json
index 0c5d095..73ec301 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
{
"name": "ramsey/collection",
"type": "library",
- "description": "A PHP 7.2+ library for representing and manipulating collections.",
+ "description": "A PHP library for representing and manipulating collections.",
"keywords": [
"array",
"collection",
@@ -19,7 +19,8 @@
}
],
"require": {
- "php": "^7.2 || ^8"
+ "php": "^7.3 || ^8",
+ "symfony/polyfill-php81": "^1.23"
},
"require-dev": {
"captainhook/captainhook": "^5.3",
@@ -29,6 +30,7 @@
"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",
@@ -50,7 +52,8 @@
"autoload-dev": {
"psr-4": {
"Ramsey\\Console\\": "resources/console/",
- "Ramsey\\Collection\\Test\\": "tests/"
+ "Ramsey\\Collection\\Test\\": "tests/",
+ "Ramsey\\Test\\Generics\\": "tests/generics/"
},
"files": [
"vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest.php"
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