From 2558bcd62897f26d14bf3df8fcaf5c55dbf11776 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Thu, 4 Nov 2021 09:57:49 +0100
Subject: add missing token from PHP 8.1

---
 php-phpunit-php-token-stream4.spec | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

(limited to 'php-phpunit-php-token-stream4.spec')

diff --git a/php-phpunit-php-token-stream4.spec b/php-phpunit-php-token-stream4.spec
index 8c71ede..5d1289a 100644
--- a/php-phpunit-php-token-stream4.spec
+++ b/php-phpunit-php-token-stream4.spec
@@ -27,7 +27,7 @@
 
 Name:           php-%{pk_vendor}-%{pk_project}%{major}
 Version:        4.0.4
-Release:        1%{?dist}
+Release:        4%{?dist}
 Summary:        Wrapper around PHP tokenizer extension
 
 License:        BSD
@@ -70,6 +70,15 @@ Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php
 %prep
 %setup -q -n %{gh_project}-%{gh_commit}
 
+cat << 'EOF' | tee -a src/NewTokens.php
+<?php declare(strict_types=1);
+
+// From PHP 8.1
+class PHP_Token_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG extends PHP_Token
+{
+}
+EOF
+
 
 %build
 # Generate the Autoloader
@@ -88,7 +97,7 @@ touch vendor/autoload.php
 
 : Run upstream test suite
 ret=0
-for cmd in php php73 php74 php80; do
+for cmd in php php73 php74 php80 php81; do
   if which $cmd; then
     $cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php \
       %{_bindir}/phpunit9  --verbose || ret=1
@@ -111,6 +120,9 @@ exit $ret
 
 
 %changelog
+* Thu Nov  4 2021 Remi Collet <remi@remirepo.net> - 4.0.4-4
+- add missing token from PHP 8.1
+
 * Mon Aug 10 2020 Remi Collet <remi@remirepo.net> - 4.0.4-1
 - update to 4.0.4
 
-- 
cgit