diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index acfb94a..248eeee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,17 +10,17 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: ['7.4', '8.0', '8.1'] + php: ['8.0', '8.1', '8.2'] steps: - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install dependencies run: composer install --no-interaction --no-progress - name: Run tests - run: php vendor/bin/phpunit --configuration Tests/phpunit.xml --verbose --fail-on-warning + run: php vendor/bin/phpunit --configuration Tests/phpunit.xml --fail-on-warning - name: Run phpstan run: php vendor/bin/phpstan - name: Run psalm diff --git a/Tests/Tests.php b/Tests/Tests.php index 1453554..935d4d0 100644 --- a/Tests/Tests.php +++ b/Tests/Tests.php @@ -11,7 +11,6 @@ class TestableSocket extends BaseSocket public function __construct( ) { - /** @var \SplQueue */ $this->PacketQueue = new \SplQueue(); $this->PacketQueue->setIteratorMode( \SplDoublyLinkedList::IT_MODE_DELETE ); @@ -157,7 +156,7 @@ public function testGetInfo( string $RawInput, array $ExpectedOutput ) : void $this->assertEquals( $ExpectedOutput, $RealOutput ); } - public function InfoProvider() : array + public static function InfoProvider() : array { $DataProvider = []; @@ -221,7 +220,7 @@ public function testBadGetRulesAfterCorrectChallenge( string $Data ) : void $this->SourceQuery->GetRules(); } - public function BadPacketProvider( ) : array + public static function BadPacketProvider( ) : array { return [ @@ -263,7 +262,7 @@ public function testGetRules( array $RawInput, array $ExpectedOutput ) : void $this->assertEquals( $ExpectedOutput, $RealOutput ); } - public function RulesProvider() : array + public static function RulesProvider() : array { $DataProvider = []; @@ -299,7 +298,7 @@ public function testGetPlayers( array $RawInput, array $ExpectedOutput ) : void $this->assertEquals( $ExpectedOutput, $RealOutput ); } - public function PlayersProvider() : array + public static function PlayersProvider() : array { $DataProvider = []; diff --git a/Tests/phpunit.xml b/Tests/phpunit.xml index 5751ddc..e13454e 100644 --- a/Tests/phpunit.xml +++ b/Tests/phpunit.xml @@ -1,18 +1,19 @@ - - - - ./Tests.php - - - - - ../SourceQuery - - - - - + + + + + + + + + ./Tests.php + + + + + + ../SourceQuery + + diff --git a/composer.json b/composer.json index 5a2d346..c452e05 100644 --- a/composer.json +++ b/composer.json @@ -18,13 +18,13 @@ ], "require": { - "php": ">=7.4" + "php": ">=8.0" }, "require-dev": { - "phpunit/phpunit": "^9.5", - "vimeo/psalm": "^4.7", - "phpstan/phpstan": "^0.12.83" + "phpunit/phpunit": "^10.3", + "vimeo/psalm": "^5.15", + "phpstan/phpstan": "^1.10" }, "autoload": { diff --git a/phpstan.neon b/phpstan.neon index 0deb5a0..884af76 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -4,5 +4,5 @@ parameters: level: 6 paths: - . - excludes_analyse: + excludePaths: - vendor diff --git a/psalm.xml b/psalm.xml index 8af2342..ade2383 100644 --- a/psalm.xml +++ b/psalm.xml @@ -2,6 +2,8 @@