File: 0003-Fix-regression-from-update-to-theseer-tokenizer-2.x.patch

package info (click to toggle)
php-codecoverage 12.5.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 62,548 kB
  • sloc: javascript: 35,234; php: 25,676; xml: 1,353; makefile: 46
file content (36 lines) | stat: -rw-r--r-- 1,804 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From: Markus Staab <markus.staab@redaxo.de>
Date: Mon, 8 Dec 2025 12:32:24 +0100
Subject: Fix regression from update to theseer/tokenizer 2.x

Origin: upstream, https://github.com/sebastianbergmann/php-code-coverage/commit/3cf9ab1cff5a9b8912bd251f7e4fc5f700aea7b7
---
 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 607a2d5..550171f 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 9ef89df..88523d3 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>