Fix deprecated InvalidArgumentException - #1133
Conversation
Fix deprecated InvalidArgumentException in Notifier::prepare() Signed-off-by: Simon J Guillot <58807831+sjg2203@users.noreply.github.com>
come-nc
left a comment
There was a problem hiding this comment.
Looks good but this is only possible if we drop support for 29 on the main branch as the exception was added in 30.
|
We could hang onto this for when 29 support is dropped, and in the meantime just add a wrapper that adapts the notifier based on whichever class exists |
Adds a createNotificationException() helper that checks whether UnknownNotificationException exists Signed-off-by: Simon J Guillot <58807831+sjg2203@users.noreply.github.com>
|
I think it’s fine to drop 29, I can bump stable29 later if I need a release for 29. |
come-nc
left a comment
There was a problem hiding this comment.
Ah, I did not see you added the wrapper, that works as well, thanks.
|
You need to run |
Signed-off-by: Simon J Guillot <58807831+sjg2203@users.noreply.github.com>
|
My bad, forgot to format. Should be good now |
come-nc
left a comment
There was a problem hiding this comment.
Something is wrong, you changed formatting on the whole file.
Which command did you use?
|
|
Signed-off-by: Simon J Guillot <58807831+sjg2203@users.noreply.github.com>
|
I cherry-picked your commits into #1134 and applied |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Fix deprecated InvalidArgumentException in Notifier::prepare() to match Nextcloud 34 requirement, removing repeated log warning such as:
Warning: OCA\UserMigration\Notification\Notifier::prepare() through \InvalidArgumentException which is deprecated. Throw \OCP\Notification\UnknownNotificationException when the notification is not known to your notifier and otherwise handle all \InvalidArgumentException yourself.🤖 AI (if applicable)