From 02cde27a122edb2adc5ba8fbde490ff82245c43a Mon Sep 17 00:00:00 2001 From: Art4 Date: Fri, 31 Jan 2025 15:35:07 +0000 Subject: [PATCH] Mute calles of trigger_error() --- src/Core/Logger.php | 16 ++++++++-------- src/DI.php | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Core/Logger.php b/src/Core/Logger.php index a050f7e245..e10b9f2ef4 100644 --- a/src/Core/Logger.php +++ b/src/Core/Logger.php @@ -34,7 +34,7 @@ class Logger */ public static function emergency(string $message, array $context = []) { - trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED); + @trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED); self::getInstance()->emergency($message, $context); } @@ -53,7 +53,7 @@ class Logger */ public static function alert(string $message, array $context = []) { - trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED); + @trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED); self::getInstance()->alert($message, $context); } @@ -71,7 +71,7 @@ class Logger */ public static function critical(string $message, array $context = []) { - trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED); + @trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED); self::getInstance()->critical($message, $context); } @@ -88,7 +88,7 @@ class Logger */ public static function error(string $message, array $context = []) { - trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED); + @trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED); self::getInstance()->error($message, $context); } @@ -107,7 +107,7 @@ class Logger */ public static function warning(string $message, array $context = []) { - trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED); + @trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED); self::getInstance()->warning($message, $context); } @@ -123,7 +123,7 @@ class Logger */ public static function notice(string $message, array $context = []) { - trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED); + @trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED); self::getInstance()->notice($message, $context); } @@ -142,7 +142,7 @@ class Logger */ public static function info(string $message, array $context = []) { - trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED); + @trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED); self::getInstance()->info($message, $context); } @@ -158,7 +158,7 @@ class Logger */ public static function debug(string $message, array $context = []) { - trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED); + @trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, use constructor injection or `DI::logger()` instead.', E_USER_DEPRECATED); self::getInstance()->debug($message, $context); } diff --git a/src/DI.php b/src/DI.php index 405735e168..94bb4c308a 100644 --- a/src/DI.php +++ b/src/DI.php @@ -332,7 +332,7 @@ abstract class DI */ public static function workerLogger() { - trigger_error('`' . __METHOD__ . '()` is deprecated since 2025.02 and will be removed after 5 months, use `DI::logger()` instead.', E_USER_DEPRECATED); + @trigger_error('`' . __METHOD__ . '()` is deprecated since 2025.02 and will be removed after 5 months, use `DI::logger()` instead.', E_USER_DEPRECATED); return self::$dice->create(Core\Logger\Type\WorkerLogger::class); }