mirror of
https://github.com/flarum/framework.git
synced 2024-11-28 11:34:36 +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
fddd134fa0
commit
4f688fc9a2
|
@ -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…
Reference in New Issue
Block a user