mirror of
https://github.com/flarum/core.git
synced 2025-07-20 00:01:17 +02:00
Laravel: Stop calling deprecated fire() method
This has been deprecated and removed from the contract for a long time, and it will be completely dropped in v5.8, our next upgrade target.
This commit is contained in:
@@ -100,7 +100,7 @@ class ApiServiceProvider extends AbstractServiceProvider
|
||||
'discussionRenamed' => BasicDiscussionSerializer::class
|
||||
];
|
||||
|
||||
$this->app->make('events')->fire(
|
||||
$this->app->make('events')->dispatch(
|
||||
new ConfigureNotificationTypes($blueprints, $serializers)
|
||||
);
|
||||
|
||||
@@ -121,7 +121,7 @@ class ApiServiceProvider extends AbstractServiceProvider
|
||||
$callback = include __DIR__.'/routes.php';
|
||||
$callback($routes, $factory);
|
||||
|
||||
$this->app->make('events')->fire(
|
||||
$this->app->make('events')->dispatch(
|
||||
new ConfigureApiRoutes($routes, $factory)
|
||||
);
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@ class Server
|
||||
|
||||
$events = $app->make(Dispatcher::class);
|
||||
|
||||
$events->fire(new Configuring($app, $console));
|
||||
$events->dispatch(new Configuring($app, $console));
|
||||
}
|
||||
|
||||
private function handleErrors(Application $app, ConsoleApplication $console)
|
||||
|
@@ -187,7 +187,7 @@ class ForumServiceProvider extends AbstractServiceProvider
|
||||
$callback = include __DIR__.'/routes.php';
|
||||
$callback($routes, $factory);
|
||||
|
||||
$this->app->make('events')->fire(
|
||||
$this->app->make('events')->dispatch(
|
||||
new ConfigureForumRoutes($routes, $factory)
|
||||
);
|
||||
}
|
||||
|
@@ -434,7 +434,7 @@ class Application extends Container implements ApplicationContract
|
||||
*/
|
||||
protected function markAsRegistered($provider)
|
||||
{
|
||||
$this['events']->fire($class = get_class($provider), [$provider]);
|
||||
$this['events']->dispatch($class = get_class($provider), [$provider]);
|
||||
|
||||
$this->serviceProviders[] = $provider;
|
||||
|
||||
|
@@ -34,7 +34,7 @@ class NotificationServiceProvider extends AbstractServiceProvider
|
||||
DiscussionRenamedBlueprint::class => ['alert']
|
||||
];
|
||||
|
||||
$this->app->make('events')->fire(
|
||||
$this->app->make('events')->dispatch(
|
||||
new ConfigureNotificationTypes($blueprints)
|
||||
);
|
||||
|
||||
|
@@ -34,7 +34,7 @@ class PostServiceProvider extends AbstractServiceProvider
|
||||
DiscussionRenamedPost::class
|
||||
];
|
||||
|
||||
$this->app->make('events')->fire(
|
||||
$this->app->make('events')->dispatch(
|
||||
new ConfigurePostTypes($models)
|
||||
);
|
||||
|
||||
|
@@ -49,7 +49,7 @@ class SearchServiceProvider extends AbstractServiceProvider
|
||||
$gambits->add(EmailGambit::class);
|
||||
$gambits->add(GroupGambit::class);
|
||||
|
||||
$app->make('events')->fire(
|
||||
$app->make('events')->dispatch(
|
||||
new ConfigureUserGambits($gambits)
|
||||
);
|
||||
|
||||
@@ -70,7 +70,7 @@ class SearchServiceProvider extends AbstractServiceProvider
|
||||
$gambits->add(HiddenGambit::class);
|
||||
$gambits->add(UnreadGambit::class);
|
||||
|
||||
$app->make('events')->fire(
|
||||
$app->make('events')->dispatch(
|
||||
new ConfigureDiscussionGambits($gambits)
|
||||
);
|
||||
|
||||
|
@@ -90,6 +90,6 @@ if (! function_exists('event')) {
|
||||
*/
|
||||
function event($event, $payload = [], $halt = false)
|
||||
{
|
||||
return app('events')->fire($event, $payload, $halt);
|
||||
return app('events')->dispatch($event, $payload, $halt);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user