summaryrefslogtreecommitdiffstats
path: root/php-microsoft-tolerant-php-parser.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-microsoft-tolerant-php-parser.spec')
-rw-r--r--php-microsoft-tolerant-php-parser.spec21
1 files changed, 14 insertions, 7 deletions
diff --git a/php-microsoft-tolerant-php-parser.spec b/php-microsoft-tolerant-php-parser.spec
index 628580c..c4e07f5 100644
--- a/php-microsoft-tolerant-php-parser.spec
+++ b/php-microsoft-tolerant-php-parser.spec
@@ -1,6 +1,6 @@
# remirepo/fedora spec file for php-microsoft-tolerant-php-parser
#
-# Copyright (c) 2018-2020 Remi Collet
+# Copyright (c) 2018-2021 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -23,7 +23,7 @@
Name: php-%{pk_vendor}-%{pk_name}
Version: 0.0.23
-Release: 1%{?dist}
+Release: 4%{?dist}
Summary: Tolerant PHP-to-AST parser
License: MIT
@@ -42,7 +42,7 @@ BuildRequires: php-spl
BuildRequires: php-tokenizer
# From composer.json, "require-dev": {
# "phpunit/phpunit": "^6.4"
-BuildRequires: phpunit6 >= 6.4
+BuildRequires: phpunit7
%endif
# Autoloader
BuildRequires: php-fedora-autoloader-devel
@@ -89,20 +89,24 @@ cp -pr src %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}
sed -e 's:src/bootstrap.php:%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php:' \
-i phpunit.xml
+# test using BaseTestListener dropped in phpunit7
+rm tests/LexicalGrammarTest.php
+rm tests/ParserGrammarTest.php
+
: Run the test suite
ret=0
-for cmd in php php72 php73 php74; do
+for cmd in php php73 php74 php80; do
if which $cmd; then
- $cmd %{_bindir}/phpunit6 \
+ $cmd %{_bindir}/phpunit7 \
--testsuite invariants \
|| ret=1
- $cmd %{_bindir}/phpunit6 \
+ $cmd %{_bindir}/phpunit7 \
--testsuite grammar \
--filter '^((?!(testOutputTreeClassificationAndLength)).)*$' \
|| ret=1
- $cmd %{_bindir}/phpunit6 \
+ $cmd %{_bindir}/phpunit7 \
--testsuite api\
--filter '^((?!(testOutOfOrderTextEdits|testOverlappingTextEdits)).)*$' \
|| ret=1
@@ -124,6 +128,9 @@ exit $ret
%changelog
+* Tue Mar 23 2021 Remi Collet <remi@remirepo.net> - 0.0.23-4
+- switch to phpunit7
+
* Mon Sep 14 2020 Remi Collet <remi@remirepo.net> - 0.0.23-1
- update to 0.0.23