Skip to content

Commit c05864a

Browse files
committed
PHP 8.2 support
1 parent 6840a31 commit c05864a

File tree

6 files changed

+22
-18
lines changed

6 files changed

+22
-18
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ jobs:
88
strategy:
99
fail-fast: true
1010
matrix:
11-
php: [8.1, 8.0, 7.4]
11+
php: [8.2, 8.1, 8.0, 7.4]
1212
dependency-version: [prefer-stable]
1313
os: [ubuntu-latest, windows-latest]
1414

1515
name: ${{ matrix.os }} - PHP${{ matrix.php }} - ${{ matrix.dependency-version }}
1616

1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v3
2020

2121
- name: Cache dependencies
22-
uses: actions/cache@v2
22+
uses: actions/cache@v3
2323
with:
2424
path: ~/.composer/cache/files
2525
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
],
1414
"require": {
15-
"php": ">=7.4 <8.2"
15+
"php": ">=7.4 <8.3"
1616
},
1717
"require-dev": {
1818
"phpunit/phpunit": ">=9.0",

phpstan.neon.dist

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,5 @@ parameters:
55
paths:
66
- src
77
- tests
8-
ignoreErrors:
9-
-
10-
message: '#Access to an undefined property PHPFUI\\MySQLSlowQuery\\Entry::#'
11-
paths:
12-
- tests/*
13-
-
14-
message: '#Access to an undefined property PHPFUI\\MySQLSlowQuery\\Session::#'
15-
paths:
16-
- tests/*
178

189

src/PHPFUI/MySQLSlowQuery/Entry.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
namespace PHPFUI\MySQLSlowQuery;
44

5+
/**
6+
* @property ?string $acceptedWaiver MySQL type timestamp
7+
* @property string $Time
8+
* @property string $User
9+
* @property string $Host
10+
* @property int $Id
11+
* @property float $Query_time
12+
* @property float $Lock_time
13+
* @property int $Rows_sent
14+
* @property int $Rows_examined
15+
* @property array<string> $Query
16+
* @property int $Session
17+
*/
518
class Entry extends \PHPFUI\MySQLSlowQuery\BaseObject
619
{
720
// @phpstan-ignore-next-line

src/PHPFUI/MySQLSlowQuery/Parser.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ public function getEntries(int $session = -1) : array
5959

6060
foreach ($this->entries as $entry)
6161
{
62-
// @phpstan-ignore-next-line
6362
if ($entry->Session == $session)
6463
{
6564
$entries[] = $entry;
@@ -194,9 +193,7 @@ private function parse() : void
194193
{
195194
$this->pushLine($line);
196195
}
197-
// @phpstan-ignore-next-line
198196
$entry->Query = $query;
199-
// @phpstan-ignore-next-line
200197
$entry->Session = \count($this->sessions) - 1;
201198
$this->entries[] = $entry;
202199
}

src/PHPFUI/MySQLSlowQuery/Session.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
namespace PHPFUI\MySQLSlowQuery;
44

5+
/**
6+
* @property string $Server
7+
* @property string $Port
8+
* @property string $Transport
9+
*/
510
class Session extends \PHPFUI\MySQLSlowQuery\BaseObject
611
{
712
/** @param array<int, string> $sessionData */
@@ -13,12 +18,10 @@ public function __construct(array $sessionData = [])
1318
'Transport' => '',
1419
];
1520

16-
// @phpstan-ignore-next-line
1721
$this->Server = \trim(\str_replace('. started with:', '', $sessionData[0] ?? 'unknown'));
1822

1923
if (\strpos($sessionData[1] ?? '', ', '))
2024
{
21-
// @phpstan-ignore-next-line
2225
[$this->Port, $this->Transport] = \explode(', ', \trim($sessionData[1]));
2326
}
2427
}

0 commit comments

Comments
 (0)