From 5c45513614eee7ff554abefb0e2dfff4c86157ce Mon Sep 17 00:00:00 2001 From: Kirill Nesmeyanov Date: Tue, 27 Aug 2024 10:43:15 +0300 Subject: [PATCH] Fix PHP 8.4 deprecation notices (#1903) --- src/Monolog/Handler/FingersCrossedHandler.php | 8 ++++---- src/Monolog/Handler/TelegramBotHandler.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Monolog/Handler/FingersCrossedHandler.php b/src/Monolog/Handler/FingersCrossedHandler.php index 76318307..1ce64e84 100644 --- a/src/Monolog/Handler/FingersCrossedHandler.php +++ b/src/Monolog/Handler/FingersCrossedHandler.php @@ -67,16 +67,16 @@ class FingersCrossedHandler extends Handler implements ProcessableHandlerInterfa * @phpstan-param (Closure(LogRecord|null, HandlerInterface): HandlerInterface)|HandlerInterface $handler * * @param Closure|HandlerInterface $handler Handler or factory Closure($record|null, $fingersCrossedHandler). - * @param int|string|Level|LogLevel::* $activationStrategy Strategy which determines when this handler takes action, or a level name/value at which the handler is activated + * @param int|string|Level|LogLevel::*|null $activationStrategy Strategy which determines when this handler takes action, or a level name/value at which the handler is activated * @param int $bufferSize How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. * @param bool $bubble Whether the messages that are handled can bubble up the stack or not * @param bool $stopBuffering Whether the handler should stop buffering after being triggered (default true) * @param int|string|Level|LogLevel::*|null $passthruLevel Minimum level to always flush to handler on close, even if strategy not triggered * - * @phpstan-param value-of|value-of|Level|LogLevel::*|ActivationStrategyInterface $activationStrategy - * @phpstan-param value-of|value-of|Level|LogLevel::* $passthruLevel + * @phpstan-param value-of|value-of|Level|LogLevel::*|ActivationStrategyInterface|null $activationStrategy + * @phpstan-param value-of|value-of|Level|LogLevel::*|null $passthruLevel */ - public function __construct(Closure|HandlerInterface $handler, int|string|Level|ActivationStrategyInterface $activationStrategy = null, int $bufferSize = 0, bool $bubble = true, bool $stopBuffering = true, int|string|Level|null $passthruLevel = null) + public function __construct(Closure|HandlerInterface $handler, int|string|Level|ActivationStrategyInterface|null $activationStrategy = null, int $bufferSize = 0, bool $bubble = true, bool $stopBuffering = true, int|string|Level|null $passthruLevel = null) { if (null === $activationStrategy) { $activationStrategy = new ErrorLevelActivationStrategy(Level::Warning); diff --git a/src/Monolog/Handler/TelegramBotHandler.php b/src/Monolog/Handler/TelegramBotHandler.php index e4f69a9f..bedfcf06 100644 --- a/src/Monolog/Handler/TelegramBotHandler.php +++ b/src/Monolog/Handler/TelegramBotHandler.php @@ -196,7 +196,7 @@ class TelegramBotHandler extends AbstractProcessingHandler /** * @return $this */ - public function setTopic(int $topic = null): self + public function setTopic(?int $topic = null): self { $this->topic = $topic;