summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json6
-rw-r--r--php-phpunit-php-code-coverage12.spec32
-rw-r--r--upstream.patch36
3 files changed, 59 insertions, 15 deletions
diff --git a/composer.json b/composer.json
index 5780375..607a2d5 100644
--- a/composer.json
+++ b/composer.json
@@ -33,17 +33,17 @@
"ext-dom": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*",
- "nikic/php-parser": "^5.6.2",
+ "nikic/php-parser": "^5.7.0",
"phpunit/php-file-iterator": "^6.0",
"phpunit/php-text-template": "^5.0",
"sebastian/complexity": "^5.0",
"sebastian/environment": "^8.0.3",
"sebastian/lines-of-code": "^4.0",
"sebastian/version": "^6.0",
- "theseer/tokenizer": "^1.3.1"
+ "theseer/tokenizer": "^2.0"
},
"require-dev": {
- "phpunit/phpunit": "^12.4.4"
+ "phpunit/phpunit": "^12.5.1"
},
"suggest": {
"ext-pcov": "PHP extension that provides line coverage",
diff --git a/php-phpunit-php-code-coverage12.spec b/php-phpunit-php-code-coverage12.spec
index f867a7c..557a85b 100644
--- a/php-phpunit-php-code-coverage12.spec
+++ b/php-phpunit-php-code-coverage12.spec
@@ -10,11 +10,11 @@
%bcond_without tests
# Github
-%global gh_commit bca180c050dd3ae15f87c26d25cabb34fe1a0a5a
+%global gh_commit c467c59a4f6e04b942be422844e7a6352fa01b57
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sebastianbergmann
%global gh_project php-code-coverage
-%global gh_date 2025-11-29
+%global gh_date 2025-12-08
# Packagist
%global pk_vendor phpunit
%global pk_project php-code-coverage
@@ -25,7 +25,7 @@
%global ver_major 12
Name: php-%{pk_vendor}-%{pk_project}%{ver_major}
-Version: 12.5.0
+Version: 12.5.1
Release: 1%{?dist}
Summary: PHP code coverage information, version %{ver_major}
@@ -39,26 +39,27 @@ URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: %{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
+Patch0: upstream.patch
BuildArch: noarch
BuildRequires: php(language) >= 8.3
BuildRequires: php-fedora-autoloader-devel >= 1.0.0
%if %{with tests}
-BuildRequires: (php-composer(nikic/php-parser) >= 5.6.2 with php-composer(nikic/php-parser) < 6)
+BuildRequires: (php-composer(nikic/php-parser) >= 5.7.0 with php-composer(nikic/php-parser) < 6)
BuildRequires: (php-composer(phpunit/php-file-iterator) >= 6.0 with php-composer(phpunit/php-file-iterator) < 7)
BuildRequires: (php-composer(phpunit/php-text-template) >= 5.0 with php-composer(phpunit/php-text-template) < 6)
BuildRequires: (php-composer(sebastian/complexity) >= 5.0 with php-composer(sebastian/complexity) < 6)
BuildRequires: (php-composer(sebastian/environment) >= 8.0.3 with php-composer(sebastian/environment) < 9)
BuildRequires: (php-composer(sebastian/lines-of-code) >= 4.0 with php-composer(sebastian/lines-of-code) < 5)
BuildRequires: (php-composer(sebastian/version) >= 6.0 with php-composer(sebastian/version) < 7)
-BuildRequires: (php-composer(theseer/tokenizer) >= 1.3.1 with php-composer(theseer/tokenizer) < 2)
+BuildRequires: (php-composer(theseer/tokenizer) >= 2.0.1 with php-composer(theseer/tokenizer) < 3)
BuildRequires: php-dom
BuildRequires: php-json
BuildRequires: php-libxml
BuildRequires: php-tokenizer
BuildRequires: php-xmlwriter
# From composer.json, "require-dev": {
-# "phpunit/phpunit": "^12.4.4"
-BuildRequires: phpunit12 >= 12.4.4
+# "phpunit/phpunit": "^12.5.1"
+BuildRequires: phpunit12 >= 12.5
BuildRequires: php-xdebug
%endif
@@ -67,26 +68,26 @@ BuildRequires: php-xdebug
# "ext-dom": "*",
# "ext-libxml": "*",
# "ext-xmlwriter": "*",
-# "nikic/php-parser": "^5.6.2",
+# "nikic/php-parser": "^5.7.0",
# "phpunit/php-file-iterator": "^6.0",
# "phpunit/php-text-template": "^5.0",
# "sebastian/complexity": "^5.0",
# "sebastian/environment": "^8.0.3",
# "sebastian/lines-of-code": "^4.0",
# "sebastian/version": "^6.0",
-# "theseer/tokenizer": "^1.3.1"
+# "theseer/tokenizer": "^2.0.1"
Requires: php(language) >= 8.3
Requires: php-dom
Requires: php-libxml
Requires: php-xmlwriter
-Requires: (php-composer(nikic/php-parser) >= 5.6.2 with php-composer(nikic/php-parser) < 6)
+Requires: (php-composer(nikic/php-parser) >= 5.7.0 with php-composer(nikic/php-parser) < 6)
Requires: (php-composer(phpunit/php-file-iterator) >= 6.0 with php-composer(phpunit/php-file-iterator) < 7)
Requires: (php-composer(phpunit/php-text-template) >= 5.0 with php-composer(phpunit/php-text-template) < 6)
Requires: (php-composer(sebastian/complexity) >= 5.0 with php-composer(sebastian/complexity) < 6)
Requires: (php-composer(sebastian/environment) >= 8.0.3 with php-composer(sebastian/environment) < 9)
Requires: (php-composer(sebastian/lines-of-code) >= 4.0 with php-composer(sebastian/lines-of-code) < 5)
Requires: (php-composer(sebastian/version) >= 6.0 with php-composer(sebastian/version) < 7)
-Requires: (php-composer(theseer/tokenizer) >= 1.3.1 with php-composer(theseer/tokenizer) < 2)
+Requires: (php-composer(theseer/tokenizer) >= 2.0.1 with php-composer(theseer/tokenizer) < 3)
# From composer.json, suggest
# "ext-pcov": "*",
# "ext-xdebug": "*"
@@ -117,6 +118,7 @@ Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}%{ver_major}/autoload.php
%prep
%setup -q -n %{gh_project}-%{gh_commit}
+%patch -P0 -p1
%build
@@ -134,7 +136,7 @@ cat << 'EOF' | tee -a src/autoload.php
'%{php_home}/%{ns_vendor}/Environment8/autoload.php',
'%{php_home}/%{ns_vendor}/LinesOfCode4/autoload.php',
'%{php_home}/%{ns_vendor}/Version6/autoload.php',
- '%{php_home}/TheSeer/Tokenizer/autoload.php',
+ '%{php_home}/TheSeer/Tokenizer2/autoload.php',
]);
EOF
@@ -187,6 +189,12 @@ exit $ret
%changelog
+* Tue Dec 9 2025 Remi Collet <remi@remirepo.net> - 12.5.1-1
+- update to 12.5.1
+- raise dependency on nikic/php-parser 5.7.0
+- raise dependency on theseer/tokenizer 2.0.1
+- add upstream patch for theseer/tokenizer 2.x
+
* Tue Dec 2 2025 Remi Collet <remi@remirepo.net> - 12.5.0-1
- update to 12.5.0
- raise dependency on nikic/php-parser 5.6.1
diff --git a/upstream.patch b/upstream.patch
new file mode 100644
index 0000000..06f320e
--- /dev/null
+++ b/upstream.patch
@@ -0,0 +1,36 @@
+From 3cf9ab1cff5a9b8912bd251f7e4fc5f700aea7b7 Mon Sep 17 00:00:00 2001
+From: Markus Staab <markus.staab@redaxo.de>
+Date: Mon, 8 Dec 2025 12:32:24 +0100
+Subject: [PATCH] Fix regression from update to theseer/tokenizer 2.x
+
+---
+ composer.json | 2 +-
+ .../source_with_class_and_anonymous_function.php.xml | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/composer.json b/composer.json
+index 607a2d5e1..550171f84 100644
+--- a/composer.json
++++ b/composer.json
+@@ -40,7 +40,7 @@
+ "sebastian/environment": "^8.0.3",
+ "sebastian/lines-of-code": "^4.0",
+ "sebastian/version": "^6.0",
+- "theseer/tokenizer": "^2.0"
++ "theseer/tokenizer": "^2.0.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^12.5.1"
+diff --git a/tests/_files/Report/XML/CoverageForClassWithAnonymousFunction/source_with_class_and_anonymous_function.php.xml b/tests/_files/Report/XML/CoverageForClassWithAnonymousFunction/source_with_class_and_anonymous_function.php.xml
+index 9ef89df19..88523d37c 100644
+--- a/tests/_files/Report/XML/CoverageForClassWithAnonymousFunction/source_with_class_and_anonymous_function.php.xml
++++ b/tests/_files/Report/XML/CoverageForClassWithAnonymousFunction/source_with_class_and_anonymous_function.php.xml
+@@ -100,7 +100,7 @@
+ <token name="T_FUNCTION">function</token>
+ <token name="T_WHITESPACE"> </token>
+ <token name="T_OPEN_BRACKET">(</token>
+- <token name="T_AMPERSAND">&amp;</token>
++ <token name="T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG">&amp;</token>
+ <token name="T_VARIABLE">$val</token>
+ <token name="T_COMMA">,</token>
+ <token name="T_WHITESPACE"> </token>