1
0
mirror of https://github.com/flarum/core.git synced 2025-10-13 07:54:25 +02:00

Remove deprecated notification events

This commit is contained in:
Alexander Skvortsov
2021-01-19 19:12:29 -05:00
parent 46248f601d
commit bbb7679417
5 changed files with 0 additions and 119 deletions

View File

@@ -1,42 +0,0 @@
<?php
/*
* This file is part of Flarum.
*
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
namespace Flarum\Notification\Event;
use Flarum\Notification\Blueprint\BlueprintInterface;
/**
* @deprecated in beta 15, removed in beta 16
*/
class Sending
{
/**
* The blueprint for the notification.
*
* @var BlueprintInterface
*/
public $blueprint;
/**
* The users that the notification will be sent to.
*
* @var array|int[]
*/
public $users;
/**
* @param \Flarum\Notification\Blueprint\BlueprintInterface $blueprint
* @param \Flarum\User\User[] $users
*/
public function __construct(BlueprintInterface $blueprint, array &$users)
{
$this->blueprint = $blueprint;
$this->users = &$users;
}
}

View File

@@ -9,7 +9,6 @@
namespace Flarum\Notification;
use Flarum\Event\ConfigureNotificationTypes;
use Flarum\Foundation\AbstractServiceProvider;
use Flarum\Notification\Blueprint\DiscussionRenamedBlueprint;
@@ -60,11 +59,6 @@ class NotificationServiceProvider extends AbstractServiceProvider
{
$blueprints = $this->app->make('flarum.notification.blueprints');
// Deprecated in beta 15, remove in beta 16
$this->app->make('events')->dispatch(
new ConfigureNotificationTypes($blueprints)
);
foreach ($blueprints as $blueprint => $driversEnabledByDefault) {
$this->addType($blueprint, $driversEnabledByDefault);
}

View File

@@ -11,7 +11,6 @@ namespace Flarum\Notification;
use Flarum\Notification\Blueprint\BlueprintInterface;
use Flarum\Notification\Driver\NotificationDriverInterface;
use Flarum\Notification\Event\Sending;
use Flarum\User\User;
/**
@@ -110,11 +109,6 @@ class NotificationSyncer
foreach (static::getNotificationDrivers() as $driverName => $driver) {
$driver->send($blueprint, $newRecipients);
}
if (count($newRecipients)) {
// Deprecated in beta 15, removed in beta 16
event(new Sending($blueprint, $newRecipients));
}
}
/**