From d3480955ed8331d871902f0482c013a7d115f87e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Sun, 11 Jan 2026 20:35:17 +0100 Subject: [PATCH 1/2] Upgrade to PHPStan 2 --- composer.json | 2 +- phpstan.neon.dist | 5 ----- src/Token.php | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 653829b..05249bc 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ }, "require-dev": { "doctrine/coding-standard": "^14", - "phpstan/phpstan": "^1.10", + "phpstan/phpstan": "^2", "phpunit/phpunit": "^10.5.58" }, "autoload": { diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 8d89ad9..6d0fc0d 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -3,8 +3,3 @@ parameters: paths: - %rootDir%/../../../src - %rootDir%/../../../tests - - ignoreErrors: - - - message: '#^Method Doctrine\\Tests\\Common\\Lexer\\AbstractLexerTest\:\:dataProvider\(\) should return array\\>\}\> but returns array\{array\{''price\=10'', array\{Doctrine\\Common\\Lexer\\Token\, Doctrine\\Common\\Lexer\\Token\, Doctrine\\Common\\Lexer\\Token\\}\}\}\.$#' - path: tests/AbstractLexerTest.php diff --git a/src/Token.php b/src/Token.php index b6df694..adb6f31 100644 --- a/src/Token.php +++ b/src/Token.php @@ -10,7 +10,7 @@ use function in_array; /** * @template T of UnitEnum|string|int - * @template V of string|int + * @template-covariant V of string|int */ final class Token { From 9403bfa754b846acffc28ef10bfbef1a08652c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Sun, 11 Jan 2026 20:41:59 +0100 Subject: [PATCH 2/2] Upgrade to PHPUnit 12 --- composer.json | 2 +- phpunit.xml.dist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 05249bc..811f104 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "require-dev": { "doctrine/coding-standard": "^14", "phpstan/phpstan": "^2", - "phpunit/phpunit": "^10.5.58" + "phpunit/phpunit": "^10.5.58 || ^12.5.4" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 20d5827..84f745c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,7 +2,7 @@