Skip to content

Commit b096fe3

Browse files
Merge pull request #59609 from nextcloud/bugfix/noid/progress-InvalidArgumentException-deprecation
fix(notifications): Progress deprecation of InvalidArgumentException
2 parents eecd708 + 0f2c8b1 commit b096fe3

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

@@ -432,9 +430,8 @@ public function dismissNotification(INotification $notification): void {
432430
} catch (UnknownNotificationException) {
433431
continue;
434432
} catch (\InvalidArgumentException $e) {
435-
// todo 33.0.0 Log as warning
436433
// todo 39.0.0 Log as error
437-
$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.');
434+
$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.');
438435
continue;
439436
}
440437
}

0 commit comments

Comments
 (0)