From 0f2c8b1dabd7c5e48698e239aebb528c1df926bb Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 13 Apr 2026 15:55:27 +0200 Subject: [PATCH] fix(notifications): Progress deprecation of InvalidArgumentException Signed-off-by: Joas Schilling --- lib/private/Notification/Manager.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/private/Notification/Manager.php b/lib/private/Notification/Manager.php index 6247f0484df..4309325c90f 100644 --- a/lib/private/Notification/Manager.php +++ b/lib/private/Notification/Manager.php @@ -316,9 +316,8 @@ class Manager implements IManager { $app->notify($notification); } catch (IncompleteNotificationException) { } catch (\InvalidArgumentException $e) { - // todo 33.0.0 Log as warning // todo 39.0.0 Log as error - $this->logger->debug(get_class($app) . '::notify() threw \InvalidArgumentException which is deprecated. Throw \OCP\Notification\IncompleteNotificationException when the notification is incomplete for your app and otherwise handle all \InvalidArgumentException yourself.'); + $this->logger->warning(get_class($app) . '::notify() threw \InvalidArgumentException which is deprecated. Throw \OCP\Notification\IncompleteNotificationException when the notification is incomplete for your app and otherwise handle all \InvalidArgumentException yourself.'); } } } @@ -358,9 +357,8 @@ class Manager implements IManager { } catch (UnknownNotificationException) { continue; } catch (\InvalidArgumentException $e) { - // todo 33.0.0 Log as warning // todo 39.0.0 Log as error - $this->logger->debug(get_class($notifier) . '::prepare() threw \InvalidArgumentException which is deprecated. Throw \OCP\Notification\UnknownNotificationException when the notification is not known to your notifier and otherwise handle all \InvalidArgumentException yourself.'); + $this->logger->warning(get_class($notifier) . '::prepare() threw \InvalidArgumentException which is deprecated. Throw \OCP\Notification\UnknownNotificationException when the notification is not known to your notifier and otherwise handle all \InvalidArgumentException yourself.'); continue; } @@ -449,9 +447,8 @@ class Manager implements IManager { } catch (UnknownNotificationException) { continue; } catch (\InvalidArgumentException $e) { - // todo 33.0.0 Log as warning // todo 39.0.0 Log as error - $this->logger->debug(get_class($notifier) . '::dismissNotification() threw \InvalidArgumentException which is deprecated. Throw \OCP\Notification\UnknownNotificationException when the notification is not known to your notifier and otherwise handle all \InvalidArgumentException yourself.'); + $this->logger->warning(get_class($notifier) . '::dismissNotification() threw \InvalidArgumentException which is deprecated. Throw \OCP\Notification\UnknownNotificationException when the notification is not known to your notifier and otherwise handle all \InvalidArgumentException yourself.'); continue; } }