Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Notification Type Extender #2424

Merged
merged 11 commits into from
Oct 31, 2020

Conversation

SychO9
Copy link
Member

@SychO9 SychO9 commented Oct 29, 2020

Fixes #2422
Part of #1891

Reviewers should focus on:
Would it be better to try avoiding duplicating this block of code (by defining a singleton and extending that instead in the extender)
https://github.com/flarum/core/blob/24b7a21507c4bdc5f44d1fed633129915ade0bd7/src/Notification/NotificationServiceProvider.php#L42-L59

Confirmed

  • [ ] Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).

src/Extend/Notification.php Outdated Show resolved Hide resolved
src/Extend/Notification.php Outdated Show resolved Hide resolved
src/Extend/Notification.php Outdated Show resolved Hide resolved
src/Api/ApiServiceProvider.php Show resolved Hide resolved
src/Notification/NotificationServiceProvider.php Outdated Show resolved Hide resolved
src/Api/ApiServiceProvider.php Show resolved Hide resolved
src/Notification/NotificationServiceProvider.php Outdated Show resolved Hide resolved
Copy link
Sponsor Member

@askvortsov1 askvortsov1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than making registerNotificationTypes protected (and possibly renaming it to avoid confusion since its run from boot, not from register), looks good to me! Thanks!

@askvortsov1 askvortsov1 merged commit b311512 into flarum:master Oct 31, 2020
@SychO9 SychO9 deleted the sm/notification-types-extender branch October 31, 2020 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notification Type Extender
3 participants