Skip to content

Commit 892d909

Browse files
committed
Test newer php versions, update phpstan
1 parent 18423a4 commit 892d909

File tree

6 files changed

+125
-72
lines changed

6 files changed

+125
-72
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
php: ['8.1', '8.2', '8.3']
13+
php: ['8.1', '8.2', '8.3', '8.4', '8.5']
1414

1515
steps:
1616
- name: Setup PHP

SourceQuery/BaseSocket.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ protected function ReadInternal( Buffer $Buffer, callable $SherlockFunction ) :
6363
do
6464
{
6565
$RequestID = $Buffer->ReadInt32( );
66+
$PacketCount = 0;
67+
$PacketNumber = 0;
6668

6769
switch( $this->Engine )
6870
{

SourceQuery/SourceQuery.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,11 @@ public function SetRconPassword( string $Password ) : void
530530
}
531531
}
532532

533+
if( $this->Rcon === null ) // This should not happen, but makes phpstan happy.
534+
{
535+
throw new SocketException( 'Something went wrong.', SocketException::INVALID_ENGINE );
536+
}
537+
533538
$this->Rcon->Open( );
534539
$this->Rcon->Authorize( $Password );
535540
}

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
"require-dev":
3434
{
3535
"phpunit/phpunit": "^10.3",
36-
"phpstan/phpstan": "^1.10",
37-
"phpstan/phpstan-strict-rules": "^1.6"
36+
"phpstan/phpstan": "^2.0",
37+
"phpstan/phpstan-strict-rules": "^2.0"
3838
},
3939
"autoload":
4040
{

0 commit comments

Comments
 (0)