Skip to content

Commit 8000c3e

Browse files
authored
PHP 8.3 (#166)
1 parent d50081b commit 8000c3e

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

.github/workflows/php.yml

+9
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,12 @@ jobs:
1717
extensions: pcov
1818
secrets:
1919
GPR_KEY: ${{ secrets.GPR_KEY }}
20+
21+
php-library-8-3:
22+
uses: equisoft-actions/php-workflows/.github/workflows/php-library.yml@v4
23+
with:
24+
checks: phpunit,psalm
25+
php-version: '8.3'
26+
extensions: pcov
27+
secrets:
28+
GPR_KEY: ${{ secrets.GPR_KEY }}

qodana.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
version: "1.0"
2-
linter: jetbrains/qodana-php:2022.2-eap
2+
linter: jetbrains/qodana-php:2023.3-eap
33

44
script:
55
name: php-migration
66
parameters:
7-
fromLevel: 7.4
8-
toLevel: 8.1
7+
fromLevel: 8.1
8+
toLevel: 8.3

tests/Writer/FluentdTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public function test_WrapContextInMeta_log_UnderlyingMetaDoesNotContainLevelOrMe
179179
$this->logger->expects($this->once())
180180
->method('post')
181181
->with($this->anything(), $this->callback(function ($value) use ($givenApp) {
182-
return $value['meta']['level'] === null && $value['meta']['message'] === null;
182+
return empty($value['meta']['level']) && empty($value['meta']['message']);
183183
}));
184184

185185
$this->writer->log(LogLevel::INFO, "test");
@@ -219,13 +219,13 @@ public function test_ExceptionWhenLogging_log_ReturnsFalse()
219219
$this->logger->method('post')->willThrowException(new \Exception("Connection error"));
220220
$this->writer = new Fluentd("localhost", 24224, "test", null, false, $this->factory);
221221

222-
$this->writer->log(LogLevel::INFO, "test");
223-
224222
$h = false;
225-
set_error_handler(function () use (&$h) {
223+
set_error_handler(static function () use (&$h) {
226224
$h = true;
227225
}, E_USER_WARNING);
226+
228227
$retVal = $this->writer->log(LogLevel::INFO, "Anything");
228+
restore_error_handler();
229229
$this->assertTrue($h);
230230

231231
$this->assertFalse($retVal);

0 commit comments

Comments
 (0)