From ee7e2fa4df92671a34f9c86dcdb3511479f727bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20=E2=80=9CFelds=E2=80=9D=20Liscia?= Date: Fri, 12 Apr 2024 04:50:09 -0300 Subject: [PATCH] Remove `final` from class declaration (#1859) Most (if not all) other classes in the project are not marked as final. Although it's possible to extend the functionality of this class by using composition, it goes against how the rest of the library works for no apparent reason. In my use case, I was trying to add a field linking the log entry to a request [as described in the Cloud Logging documentation](https://cloud.google.com/run/docs/logging#correlate-logs). --- src/Monolog/Formatter/GoogleCloudLoggingFormatter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php b/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php index ea555d4d..c97b9122 100644 --- a/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php +++ b/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php @@ -22,7 +22,7 @@ use Monolog\LogRecord; * * @author Luís Cobucci */ -final class GoogleCloudLoggingFormatter extends JsonFormatter +class GoogleCloudLoggingFormatter extends JsonFormatter { protected function normalizeRecord(LogRecord $record): array {