summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-08-11 14:16:01 +0200
committerRemi Collet <remi@remirepo.net>2020-08-11 14:16:01 +0200
commitd02ef005b32bcbe5b213e071c4b2822835b0a355 (patch)
tree5ece5011d97e62093884658478df217a3233dc87
parent8d6d5c2d9e7e53591f991b9fdc49294bada8337f (diff)
update to 2.13.1HEADmaster
switch to phpunit9 skip 1 test with PHP 8.0
-rw-r--r--php-twig2.spec28
1 files changed, 20 insertions, 8 deletions
diff --git a/php-twig2.spec b/php-twig2.spec
index 323de07..091da43 100644
--- a/php-twig2.spec
+++ b/php-twig2.spec
@@ -10,10 +10,11 @@
#
# Please preserve changelog entries
#
-%global with_tests 0%{!?_without_tests:1}
+%bcond_without tests
+
%global github_owner twigphp
%global github_name Twig
-%global github_commit 46a612ba1bbf6ee1c58acabacd868212ff8a2911
+%global github_commit 57e96259776ddcacf1814885fc3950460c8e18ef
%global github_short %(c=%{github_commit}; echo ${c:0:7})
%global composer_vendor twig
@@ -24,7 +25,7 @@
%global phpdir %{_datadir}/php
Name: php-%{composer_project}2
-Version: 2.13.0
+Version: 2.13.1
Release: 1%{?dist}
Summary: The flexible, fast, and secure template engine for PHP
@@ -36,10 +37,9 @@ Source1: makesrc.sh
BUildArch: noarch
## Autoloader
BuildRequires: php-fedora-autoloader-devel
-%if %{with_tests}
+%if %{with tests}
# For tests
BuildRequires: php(language) >= 7.1
-BuildRequires: phpunit8
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
BuildRequires: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2)
@@ -51,6 +51,8 @@ BuildRequires: php-composer(psr/container) >= 1.0
BuildRequires: php-symfony-polyfill < 2
BuildRequires: php-symfony-polyfill >= 1.3
%endif
+%global phpunit %{_bindir}/phpunit9
+BuildRequires: %{phpunit}
# Workaround
BuildRequires: php-symfony-common
## phpcompatinfo (computed from version 2.11.3)
@@ -138,7 +140,7 @@ cp -rp lib/Twig %{buildroot}%{phpdir}/Twig2
%{_bindir}/php -r 'require_once "%{buildroot}%{phpdir}/Twig2/autoload.php";
exit(version_compare("%{version}", Twig\Environment::VERSION, "=") ? 0 : 1);'
-%if %{with_tests}
+%if %{with tests}
mkdir vendor
phpab --output vendor/autoload.php tests
@@ -157,9 +159,14 @@ sed -e '/listener/d' phpunit.xml.dist > phpunit.xml
RETURN_CODE=0
: Upstream tests with SCLs if available
-for SCL in php php72 php73 php74 php80; do
+for SCL in "php %{phpunit}" php73 php74 php80; do
if which $SCL; then
- $SCL %{_bindir}/phpunit8 --verbose || RETURN_CODE=1
+ set $SCL
+ VER=$($1 -r 'echo PHP_VERSION_ID;')
+ [ $VER -ge 80000 ] && SKIP="--filter '^((?!(testIntegration)).)*$'"
+
+ $1 ${2:-%{_bindir}/phpunit9} $SKIP \
+ --verbose || RETURN_CODE=1
fi
done
exit $RETURN_CODE
@@ -177,6 +184,11 @@ exit $RETURN_CODE
%changelog
+* Tue Aug 11 2020 Remi Collet <remi@remirepo.net> - 2.13.1-1
+- update to 2.13.1
+- switch to phpunit9
+- skip 1 test with PHP 8.0
+
* Mon Jul 6 2020 Remi Collet <remi@remirepo.net> - 2.13.0-1
- update to 2.13.0
- raise dependency on PHP 7.1.3