diff --git a/.gitignore b/.gitignore
index 5d9b970..22fa442 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
/vendor
/composer.lock
/phpunit.xml
-/.phpunit.result.cache
+/.phpunit.cache
/phpcs.xml
/.phpcs-cache
diff --git a/composer.json b/composer.json
index b6dd4e6..995dafa 100644
--- a/composer.json
+++ b/composer.json
@@ -31,7 +31,7 @@
"require-dev": {
"doctrine/coding-standard": "^12",
"phpstan/phpstan": "^1.10",
- "phpunit/phpunit": "^9.6",
+ "phpunit/phpunit": "^10.5",
"psalm/plugin-phpunit": "^0.18.3",
"vimeo/psalm": "^5.21"
},
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index ee9fa89..20d5827 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -2,14 +2,14 @@
-
+
@@ -18,9 +18,9 @@
-
-
+
-
+
+
diff --git a/psalm.xml b/psalm.xml
index f335ebb..72d84aa 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -43,6 +43,12 @@
+
+
+
+
+
+
diff --git a/tests/AbstractLexerTest.php b/tests/AbstractLexerTest.php
index a441430..ea88754 100644
--- a/tests/AbstractLexerTest.php
+++ b/tests/AbstractLexerTest.php
@@ -5,6 +5,7 @@
namespace Doctrine\Tests\Common\Lexer;
use Doctrine\Common\Lexer\Token;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use function array_map;
@@ -82,11 +83,8 @@ public function testResetPosition(): void
$this->assertEquals($expectedTokens[0], $this->concreteLexer->lookahead);
}
- /**
- * @psalm-param list> $expectedTokens
- *
- * @dataProvider dataProvider
- */
+ /** @psalm-param list> $expectedTokens */
+ #[DataProvider('dataProvider')]
public function testMoveNext(string $input, array $expectedTokens): void
{
$this->concreteLexer->setInput($input);
@@ -126,11 +124,8 @@ public function testUtf8Mismatch(): void
);
}
- /**
- * @psalm-param list> $expectedTokens
- *
- * @dataProvider dataProvider
- */
+ /** @psalm-param list> $expectedTokens */
+ #[DataProvider('dataProvider')]
public function testPeek(string $input, array $expectedTokens): void
{
$this->concreteLexer->setInput($input);
@@ -146,11 +141,8 @@ public function testPeek(string $input, array $expectedTokens): void
$this->assertNull($this->concreteLexer->peek());
}
- /**
- * @psalm-param list> $expectedTokens
- *
- * @dataProvider dataProvider
- */
+ /** @psalm-param list> $expectedTokens */
+ #[DataProvider('dataProvider')]
public function testGlimpse(string $input, array $expectedTokens): void
{
$this->concreteLexer->setInput($input);
@@ -177,7 +169,7 @@ public static function inputUntilPositionDataProvider(): array
];
}
- /** @dataProvider inputUntilPositionDataProvider */
+ #[DataProvider('inputUntilPositionDataProvider')]
public function testGetInputUntilPosition(
string $input,
int $position,
@@ -188,11 +180,8 @@ public function testGetInputUntilPosition(
$this->assertSame($expectedInput, $this->concreteLexer->getInputUntilPosition($position));
}
- /**
- * @psalm-param list> $expectedTokens
- *
- * @dataProvider dataProvider
- */
+ /** @psalm-param list> $expectedTokens */
+ #[DataProvider('dataProvider')]
public function testIsNextToken(string $input, array $expectedTokens): void
{
$this->concreteLexer->setInput($input);
@@ -205,11 +194,8 @@ public function testIsNextToken(string $input, array $expectedTokens): void
}
}
- /**
- * @psalm-param list> $expectedTokens
- *
- * @dataProvider dataProvider
- */
+ /** @psalm-param list> $expectedTokens */
+ #[DataProvider('dataProvider')]
public function testIsNextTokenAny(string $input, array $expectedTokens): void
{
$allTokenTypes = array_map(static function ($token): string {