Don't typehint the view factory in the closure in extend.php

This causes the view factory to resolve early, breaking all future extensions that use the view extender
This commit is contained in:
Alexander Skvortsov 2020-07-27 19:30:24 -04:00
parent d1cf21dcd2
commit 5d7f1d87d5

View File

@ -25,7 +25,6 @@ use Flarum\Post\Event\Revised;
use Flarum\Post\Post;
use Flarum\User\User;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Contracts\View\Factory;
return [
(new Extend\Frontend('forum'))
@ -45,7 +44,7 @@ return [
(new Extend\View)
->namespace('flarum-mentions', __DIR__.'/views'),
function (Dispatcher $events, Factory $views) {
function (Dispatcher $events) {
$events->listen(WillSerializeData::class, Listener\FilterVisiblePosts::class);
$events->subscribe(Listener\AddPostMentionedByRelationship::class);