nextcloud / terms_of_service

📜 Requires users to accept the terms of service before accessing data.
https://apps.nextcloud.com/apps/terms_of_service
GNU Affero General Public License v3.0
29 stars 19 forks source link

Deprecated usage of notification notifier #966

Open ChristophWurst opened 2 months ago

ChristophWurst commented 2 months ago
{
  "reqId": "zmocK7Zhtu3bDXD82WyI",
  "level": 0,
  "time": "2024-07-31T08:16:42+00:00",
  "remoteAddr": "127.0.0.1",
  "user": "admin",
  "app": "no app in context",
  "method": "GET",
  "url": "/ocs/v2.php/apps/notifications/api/v2/notifications",
  "message": "OCA\\TermsOfService\\Notifications\\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.",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0",
  "version": "30.0.0.3",
  "data": []
}
max-nextcloud commented 1 month ago

The \\OCP\\Notification\\UnknownNotificationException is available since Nextcloud 30. This debug message will turn into a warning with Nextcloud 33 and an Error with Nextcloud 39.

We currently create one release for 28 to 30 - so we'd need to check for the existance of UnkownNotificationException. I guess best to replace this when we are releasing for 30 to 32.