Add comment explaining extension boot process

This commit is contained in:
Toby Zerner 2018-06-15 19:25:40 +09:30
parent 050496a20e
commit 2bc7c4134a

View File

@ -24,6 +24,10 @@ class ExtensionServiceProvider extends AbstractServiceProvider
$this->app->singleton(ExtensionManager::class);
$this->app->alias(ExtensionManager::class, 'flarum.extensions');
// Boot extensions when the app is booting. This must be done as a boot
// listener on the app rather than in the service provider's boot method
// below, so that extensions have a chance to register things on the
// container before the core boot code runs.
$this->app->booting(function (Container $app) {
$app->make('flarum.extensions')->extend($app);
});