From 4f688fc9a25da9bfefe86b6cb418e2ca2a754519 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Tue, 3 Oct 2017 16:53:18 +0200 Subject: [PATCH] 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. --- src/Install/Console/InstallCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Install/Console/InstallCommand.php b/src/Install/Console/InstallCommand.php index 1255e6216..6c628fcbd 100644 --- a/src/Install/Console/InstallCommand.php +++ b/src/Install/Console/InstallCommand.php @@ -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();