Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Psalm #129

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@
/phpcs.xml.dist export-ignore
/phpstan.neon.dist export-ignore
/phpunit.xml.dist export-ignore
/psalm.xml export-ignore
4 changes: 1 addition & 3 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
- composer.*
- src/**
- phpstan*
- psalm*
- tests/**
push:
branches:
Expand All @@ -20,10 +19,9 @@ on:
- composer.*
- src/**
- phpstan*
- psalm*
- tests/**

jobs:
static-analysis:
name: "Static Analysis"
uses: "doctrine/.github/.github/workflows/static-analysis[email protected]"
uses: "doctrine/.github/.github/workflows/phpstan[email protected]"
4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@
"require-dev": {
"doctrine/coding-standard": "^12",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.5",
"psalm/plugin-phpunit": "^0.18.3",
"vimeo/psalm": "^5.21"
"phpunit/phpunit": "^10.5"
},
"autoload": {
"psr-4": {
Expand Down
73 changes: 0 additions & 73 deletions psalm.xml

This file was deleted.

6 changes: 3 additions & 3 deletions src/AbstractLexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function getInputUntilPosition(int $position)
*
* @return bool
*
* @psalm-assert-if-true !=null $this->lookahead
* @phpstan-assert-if-true !=null $this->lookahead
*/
public function isNextToken(int|string|UnitEnum $type)
{
Expand All @@ -152,7 +152,7 @@ public function isNextToken(int|string|UnitEnum $type)
*
* @return bool
*
* @psalm-assert-if-true !=null $this->lookahead
* @phpstan-assert-if-true !=null $this->lookahead
*/
public function isNextTokenAny(array $types)
{
Expand All @@ -164,7 +164,7 @@ public function isNextTokenAny(array $types)
*
* @return bool
*
* @psalm-assert-if-true !null $this->lookahead
* @phpstan-assert-if-true !null $this->lookahead
*/
public function moveNext()
{
Expand Down
14 changes: 7 additions & 7 deletions tests/AbstractLexerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function tearDown(): void
setlocale(LC_ALL, null);
}

/** @psalm-return list<array{string, list<Token<string, string|int>>}> */
/** @phpstan-return list<array{string, list<Token<string, string|int>>}> */
public static function dataProvider(): array
{
return [
Expand Down Expand Up @@ -83,7 +83,7 @@ public function testResetPosition(): void
$this->assertEquals($expectedTokens[0], $this->concreteLexer->lookahead);
}

/** @psalm-param list<Token<string, string|int>> $expectedTokens */
/** @phpstan-param list<Token<string, string|int>> $expectedTokens */
#[DataProvider('dataProvider')]
public function testMoveNext(string $input, array $expectedTokens): void
{
Expand Down Expand Up @@ -124,7 +124,7 @@ public function testUtf8Mismatch(): void
);
}

/** @psalm-param list<Token<string, string|int>> $expectedTokens */
/** @phpstan-param list<Token<string, string|int>> $expectedTokens */
#[DataProvider('dataProvider')]
public function testPeek(string $input, array $expectedTokens): void
{
Expand All @@ -141,7 +141,7 @@ public function testPeek(string $input, array $expectedTokens): void
$this->assertNull($this->concreteLexer->peek());
}

/** @psalm-param list<Token<string, string|int>> $expectedTokens */
/** @phpstan-param list<Token<string, string|int>> $expectedTokens */
#[DataProvider('dataProvider')]
public function testGlimpse(string $input, array $expectedTokens): void
{
Expand All @@ -161,7 +161,7 @@ public function testGlimpse(string $input, array $expectedTokens): void
$this->assertNull($this->concreteLexer->peek());
}

/** @psalm-return list<array{string, int, string}> */
/** @phpstan-return list<array{string, int, string}> */
public static function inputUntilPositionDataProvider(): array
{
return [
Expand All @@ -180,7 +180,7 @@ public function testGetInputUntilPosition(
$this->assertSame($expectedInput, $this->concreteLexer->getInputUntilPosition($position));
}

/** @psalm-param list<Token<string, string|int>> $expectedTokens */
/** @phpstan-param list<Token<string, string|int>> $expectedTokens */
#[DataProvider('dataProvider')]
public function testIsNextToken(string $input, array $expectedTokens): void
{
Expand All @@ -194,7 +194,7 @@ public function testIsNextToken(string $input, array $expectedTokens): void
}
}

/** @psalm-param list<Token<string, string|int>> $expectedTokens */
/** @phpstan-param list<Token<string, string|int>> $expectedTokens */
#[DataProvider('dataProvider')]
public function testIsNextTokenAny(string $input, array $expectedTokens): void
{
Expand Down