mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 07:11:56 +08:00
Change order of service provider registration
Here, the order is relevant, because at this point, the application has already been booted. Hence, all boot() methods are called immediately, which might depend on other service providers' register() methods having run. In this case, the DiscussionServiceProvider depends on the Gate class being registered in the container by the UserServiceProvider.
This commit is contained in:
parent
45bb311ca7
commit
399ff616ff
@ -186,13 +186,13 @@ class InstallCommand extends AbstractCommand
|
||||
|
||||
$this->writeSettings();
|
||||
|
||||
$this->application->register(UserServiceProvider::class);
|
||||
$this->application->register(FormatterServiceProvider::class);
|
||||
$this->application->register(DiscussionServiceProvider::class);
|
||||
$this->application->register(GroupServiceProvider::class);
|
||||
$this->application->register(NotificationServiceProvider::class);
|
||||
$this->application->register(SearchServiceProvider::class);
|
||||
$this->application->register(PostServiceProvider::class);
|
||||
$this->application->register(UserServiceProvider::class);
|
||||
|
||||
$this->seedGroups();
|
||||
$this->seedPermissions();
|
||||
|
Loading…
x
Reference in New Issue
Block a user