Skip to content

IBX-12339: Log a warning when notifier subscription is missing - #2036

Open
vidarl wants to merge 1 commit into
5.0from
IBX-12339_notifier_does_not_log_when_unconfigured
Open

IBX-12339: Log a warning when notifier subscription is missing#2036
vidarl wants to merge 1 commit into
5.0from
IBX-12339_notifier_does_not_log_when_unconfigured

Conversation

@vidarl

@vidarl vidarl commented Aug 27, 2026

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-12339

Related PRs:

Strictly speaking not related, but needed in order to make the invite user functionality work end-to-end (IBX-12340):

Description:

Ibexa\AdminUi\Notifier\UserInvitation::sendInvitation() and
Ibexa\AdminUi\Notifier\PasswordReset::sendMessage() both return without sending and without any
trace when notifications.subscriptions does not carry their notification class:

if ($this->isNotifierConfigured()) {
    $this->sendNotification($invitation);
}

Both classes are LoggerAware and are handed a logger, but nothing is logged if the notification
class is not mentioned in notifications.subscriptions.

This PR turns the silent return into a logged warning, naming the exact configuration key to add.

For QA:

  1. Remove Ibexa\AdminUi\Notifier\Notification\UserInvitation from
    ibexa.system.<scope>.notifier.subscriptions, clear cache, and invite a user from the back
    office. The invitation row is still written to ibexa_user_invitation; expect no mail, and in
    var/log/dev.log:
    app.WARNING: No invitation e-mail was sent: subscribe Ibexa\AdminUi\Notifier\Notification\UserInvitation under "ibexa.system.<scope>.notifier.subscriptions" to enable it.
  2. Add the subscription back, clear cache, invite again: mail is sent and nothing is logged.
  3. Same two steps for password reset via Forgot password and
    Ibexa\AdminUi\Notifier\Notification\UserPasswordReset.

Documentation:

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants