summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-03-31 12:08:55 +0200
committerRemi Collet <remi@remirepo.net>2021-03-31 12:08:55 +0200
commitd612e5e5d91a6e6f6e07c4d1a959067a08832ac7 (patch)
tree8610498b61762e12bfb4cc1206af4833275574c0
parenta5e8c7be0f57b24ff3e34831332579104898678a (diff)
update to 2.3.0
raise dependency on PHP 7.3 switch to phpunit9
-rw-r--r--composer.json6
-rw-r--r--php-di-invoker.spec47
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 <shawn@iwin.ski>
+# Copyright (c) 2016-2021 Shawn Iwinski <shawn@iwin.ski>
#
# 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
<?php
@@ -120,8 +123,8 @@ BOOTSTRAP
: Upstream tests
RETURN_CODE=0
-PHPUNIT=$(which phpunit)
-for PHP_EXEC in "" %{?rhel:php55} php56 php70 php71 php72 php73 php74; do
+PHPUNIT=$(which phpunit9)
+for PHP_EXEC in "" php73 php74 php80; do
if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
$PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
|| RETURN_CODE=1
@@ -134,6 +137,7 @@ exit $RETURN_CODE
%files
+# remirepo:1
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md
@@ -142,6 +146,11 @@ exit $RETURN_CODE
%changelog
+* Wed Mar 31 2021 Remi Collet <remi@remirepo.net> - 2.3.0-1
+- update to 2.3.0
+- raise dependency on PHP 7.3
+- switch to phpunit9
+
* Sun May 26 2019 Shawn Iwinski <shawn@iwin.ski> - 2.0.0-1
- Update to 2.0.0 (RHBZ #1434817)
- Add range version dependencies for Fedora >= 27 || RHEL >= 8