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:
Franz Liedke 2017-10-03 16:53:18 +02:00
parent 45bb311ca7
commit 399ff616ff

View File

@ -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();