FriendsOfFlarum/pretty-mail

NotificationMailer constructor parameters changed in Flarum 1.5, override broken

Closed this issue · 2 comments

SettingsRepositoryInterface $settings was added as a third constructor parameter to NotificationMailer in Flarum 1.5.

https://github.com/flarum/framework/blob/v1.5.0/framework/core/src/Notification/NotificationMailer.php#L40

public function __construct(Mailer $mailer, TranslatorInterface $translator, SettingsRepositoryInterface $settings)

It throws an error because we are not providing the correct number of parameters in our extended class:

public function __construct(Mailer $mailer, View $view, SettingsRepositoryInterface $settings, TranslatorInterface $translator, UrlGenerator $url, Paths $paths)
{
parent::__construct($mailer, $translator);
$this->view = $view;
$this->settings = $settings;
$this->url = $url;
$this->assets_dir = $paths->public.DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR;
}

Change made in flarum/framework#3525

Hi, Any progress to fix?
I just waiting for this extension to upgrade to 1.5!
My forum just send alot mails to users and don't want to send email without our custom template.

Fixed in version 1.1.1