summaryrefslogtreecommitdiffstats
path: root/php-twig.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-08-11 14:18:21 +0200
committerRemi Collet <remi@remirepo.net>2020-08-11 14:18:21 +0200
commit65b5fd27efbbbc557ec63d6aa5b7530a6b2598f4 (patch)
tree337aed099afab0dd3ccbd58d4dffbe22c6434b19 /php-twig.spec
parentdc4b8bcc1b69571b56f155e2a3af28ab51bc4d13 (diff)
update to 1.43.1
switch to phpunit9 skip 1 more test with PHP 8.0
Diffstat (limited to 'php-twig.spec')
-rw-r--r--php-twig.spec40
1 files changed, 25 insertions, 15 deletions
diff --git a/php-twig.spec b/php-twig.spec
index 96437d5..bc2d5e8 100644
--- a/php-twig.spec
+++ b/php-twig.spec
@@ -11,10 +11,13 @@
# Please preserve changelog entries
#
+# Build using "--without tests" to disable tests
+%bcond_without tests
+
%global github_owner twigphp
%global github_name Twig
-%global github_version 1.43.0
-%global github_commit 597a03e85a60af6feee4f5127f3ef4279a1694c3
+%global github_version 1.43.1
+%global github_commit 2311602f6a208715252febe682fa7c38e56a3373
%global github_short %(c=%{github_commit}; echo ${c:0:7})
# Lib
@@ -24,9 +27,6 @@
# "php": ">=7.1.3"
%global php_min_ver 7.1.3
-# Build using "--without tests" to disable tests
-%bcond_without tests
-
%{!?phpdir: %global phpdir %{_datadir}/php}
%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d}
@@ -44,7 +44,6 @@ BuildArch: noarch
BuildRequires: php-devel >= %{php_min_ver}
# Tests
%if %{with tests}
-BuildRequires: phpunit8
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
BuildRequires: (php-composer(symfony/debug) >= 3.4 with php-composer(symfony/debug) < 4)
BuildRequires: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2)
@@ -53,6 +52,8 @@ BuildRequires: php-symfony3-debug >= 3.4
BuildRequires: php-composer(psr/container) < 2
BuildRequires: php-composer(psr/container) >= 1.0
%endif
+%global phpunit %{_bindir}/phpunit9
+BuildRequires: %{phpunit}
## phpcompatinfo (computed from version 1.42.2)
BuildRequires: php-ctype
BuildRequires: php-date
@@ -97,7 +98,7 @@ Provides: php-twig-Twig = %{version}-%{release}
Provides: php-pear(pear.twig-project.org/Twig) = %{version}
# This pkg was the only one in this channel so the channel is no longer needed
-Obsoletes: php-channel-twig
+Obsoletes: php-channel-twig < 1.4
%description
@@ -163,15 +164,19 @@ sed -e '/listener/d' phpunit.xml.dist > phpunit.xml
: Test suite without extension
ret=0
-for cmd in php php72 php73 php74 php80; do
- if which $cmd; then
- $cmd %{_bindir}/phpunit8 \
- --filter '^((?!(testGetAttributeExceptions|testGetAttributeWithTemplateAsObject)).)*$' \
- --verbose || ret=1
- fi
-done
+for SCL in "php %{phpunit}" php73 php74 php80; do
+ if which $SCL; then
+ set $SCL
+ SKIP="--filter '^((?!(testResolveArgumentsWithMissingParameterForArbitraryArgumentsOnObject|testResolveArgumentsWithMissingParameterForArbitraryArgumentsOnFunction)).)*$'"
+
+ VER=$($1 -r 'echo PHP_VERSION_ID;')
+ [ $VER -ge 80000 ] && SKIP="--filter '^((?!(testResolveArgumentsWithMissingParameterForArbitraryArgumentsOnObject|testResolveArgumentsWithMissingParameterForArbitraryArgumentsOnFunction|testIntegration)).)*$'"
-exit $ret
+ $1 ${2:-%{_bindir}/phpunit9} $SKIP \
+ --verbose || RETURN_CODE=1
+ fi
+done
+exit $RETURN_CODE
%else
: Tests skipped
%endif
@@ -186,6 +191,11 @@ exit $ret
%changelog
+* Tue Aug 11 2020 Remi Collet <remi@remirepo.net> - 1.43.1-1
+- update to 1.43.1
+- switch to phpunit9
+- skip 1 more test with PHP 8.0
+
* Mon Jul 6 2020 Remi Collet <remi@remirepo.net> - 1.43.0-1
- update to 1.43.0
- raise dependency on PHP 7.1.3