From 28da4d13f24d38c45805e9ebdf1f816cce4151cd Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Mon, 20 Mar 2023 19:11:38 -0400 Subject: [PATCH 1/2] Add return type to handle psr/log v3 --- inc/class-ai-logger.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/inc/class-ai-logger.php b/inc/class-ai-logger.php index 35a83959..54689e34 100644 --- a/inc/class-ai-logger.php +++ b/inc/class-ai-logger.php @@ -237,7 +237,7 @@ public function to_term( string $key, int $term_id, $level = Logger::DEBUG ) { * * @return void */ - public function emergency( $message, array $context = [] ) { + public function emergency( $message, array $context = [] ): void { $this->logger->emergency( $message, $context ); } @@ -252,7 +252,7 @@ public function emergency( $message, array $context = [] ) { * * @return void */ - public function alert( $message, array $context = [] ) { + public function alert( $message, array $context = [] ): void { $this->logger->alert( $message, $context ); } @@ -266,7 +266,7 @@ public function alert( $message, array $context = [] ) { * * @return void */ - public function critical( $message, array $context = [] ) { + public function critical( $message, array $context = [] ): void { $this->logger->critical( $message, $context ); } @@ -279,7 +279,7 @@ public function critical( $message, array $context = [] ) { * * @return void */ - public function error( $message, array $context = [] ) { + public function error( $message, array $context = [] ): void { $this->logger->error( $message, $context ); } @@ -294,7 +294,7 @@ public function error( $message, array $context = [] ) { * * @return void */ - public function warning( $message, array $context = [] ) { + public function warning( $message, array $context = [] ): void { $this->logger->warning( $message, $context ); } @@ -306,7 +306,7 @@ public function warning( $message, array $context = [] ) { * * @return void */ - public function notice( $message, array $context = [] ) { + public function notice( $message, array $context = [] ): void { $this->logger->notice( $message, $context ); } @@ -319,7 +319,7 @@ public function notice( $message, array $context = [] ) { * @param mixed[] $context Log context. * @return void */ - public function info( $message, array $context = [] ) { + public function info( $message, array $context = [] ): void { $this->logger->info( $message, $context ); } @@ -331,7 +331,7 @@ public function info( $message, array $context = [] ) { * * @return void */ - public function debug( $message, array $context = [] ) { + public function debug( $message, array $context = [] ): void { $this->logger->debug( $message, $context ); } @@ -344,7 +344,7 @@ public function debug( $message, array $context = [] ) { * * @return void */ - public function log( $level, $message, array $context = [] ) { + public function log( $level, $message, array $context = [] ): void { $this->logger->log( $level, $message, $context ); } From b23412cc12d499e7045badee46d4235e6abb0590 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Mon, 20 Mar 2023 19:14:34 -0400 Subject: [PATCH 2/2] Prepare for 2.3.2 --- CHANGELOG.md | 6 +++++- logger.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3212ad6b..41fb1258 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,11 @@ This library adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/en/1.0.0/). -## 2.4.0 +## 2.3.2 + +- Add return types to logger to appease `psr/log` v3. + +## 2.3.1 - Renamed the main plugin file from `ai-logger.php` to `logger.php`. diff --git a/logger.php b/logger.php index 9f3bf26d..3c80fbc5 100644 --- a/logger.php +++ b/logger.php @@ -3,7 +3,7 @@ * Plugin Name: Alley Logger * Plugin URI: https://github.com/alleyinteractive/logger * Description: A Monolog-based logging tool for WordPress. Supports storing log message in a custom post type or in individual posts and terms. - * Version: 2.4.0 + * Version: 2.3.2 * Author: Alley Interactive * Author URI: https://alley.com/ * Requires at least: 5.9