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 fddd134fa0
commit 4f688fc9a2
No known key found for this signature in database
GPG Key ID: 9A0231A879B055F4

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