From 853f9782168a69786816b29fec7e40f3c361f008 Mon Sep 17 00:00:00 2001 From: Brett McBride Date: Thu, 17 Jul 2025 09:45:08 +1000 Subject: [PATCH] more fixes --- .phan/config.php | 1 + psalm.xml.dist | 11 +++++++++++ src/SDK/Logs/Exporter/ConsoleExporter.php | 3 +-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.phan/config.php b/.phan/config.php index cc5df7a9..139407d1 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -286,6 +286,7 @@ return [ 'PhanAccessPropertyInternal', 'PhanTypeMismatchPropertyReal', 'PhanTemplateTypeNotUsedInFunctionReturn', + 'PhanUndeclaredClassAttribute', ], // A regular expression to match files to be excluded diff --git a/psalm.xml.dist b/psalm.xml.dist index f015d563..77797992 100644 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -39,6 +39,11 @@ + + + + + @@ -51,6 +56,12 @@ + + + + + + diff --git a/src/SDK/Logs/Exporter/ConsoleExporter.php b/src/SDK/Logs/Exporter/ConsoleExporter.php index 71d017c9..a4e0840b 100644 --- a/src/SDK/Logs/Exporter/ConsoleExporter.php +++ b/src/SDK/Logs/Exporter/ConsoleExporter.php @@ -4,7 +4,6 @@ declare(strict_types=1); namespace OpenTelemetry\SDK\Logs\Exporter; -use OpenTelemetry\API\Behavior\LogsMessagesTrait; use OpenTelemetry\SDK\Common\Export\TransportInterface; use OpenTelemetry\SDK\Common\Future\CancellationInterface; use OpenTelemetry\SDK\Common\Future\CompletedFuture; @@ -51,7 +50,7 @@ class ConsoleExporter implements LogRecordExporterInterface if ($payload === false) { return new ErrorFuture( new \RuntimeException('Failed to encode log records to JSON: ' . json_last_error_msg()) - );); + ); } $this->transport->send($payload);