Skip to content

Commit 0f2c8b1

Browse files
committed
fix(notifications): Progress deprecation of InvalidArgumentException
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent e9cd2fc commit 0f2c8b1

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

lib/private/Notification/Manager.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,8 @@ public function notify(INotification $notification): void {
316316
$app->notify($notification);
317317
} catch (IncompleteNotificationException) {
318318
} catch (\InvalidArgumentException $e) {
319-
// todo 33.0.0 Log as warning
320319
// todo 39.0.0 Log as error
321-
$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.');
320+
$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.');
322321
}
323322
}
324323
}
@@ -358,9 +357,8 @@ public function prepare(INotification $notification, string $languageCode): INot
358357
} catch (UnknownNotificationException) {
359358
continue;
360359
} catch (\InvalidArgumentException $e) {
361-
// todo 33.0.0 Log as warning
362360
// todo 39.0.0 Log as error
363-
$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.');
361+
$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.');
364362
continue;
365363
}
366364

@@ -449,9 +447,8 @@ public function dismissNotification(INotification $notification): void {
449447
} catch (UnknownNotificationException) {
450448
continue;
451449
} catch (\InvalidArgumentException $e) {
452-
// todo 33.0.0 Log as warning
453450
// todo 39.0.0 Log as error
454-
$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.');
451+
$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.');
455452
continue;
456453
}
457454
}

0 commit comments

Comments
 (0)