mirror of
https://github.com/flarum/framework.git
synced 2025-02-14 15:42:53 +08:00
parent
3604dde442
commit
6d1349e861
|
@ -27,7 +27,7 @@ class ExtensionServiceProvider extends AbstractServiceProvider
|
||||||
// Boot extensions when the app is booting. This must be done as a boot
|
// 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
|
// 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
|
// below, so that extensions have a chance to register things on the
|
||||||
// container before the core boot code runs.
|
// container before the core boots up (and starts resolving services).
|
||||||
$this->app->booting(function (Container $app) {
|
$this->app->booting(function (Container $app) {
|
||||||
$app->make('flarum.extensions')->extend($app);
|
$app->make('flarum.extensions')->extend($app);
|
||||||
});
|
});
|
||||||
|
|
|
@ -36,6 +36,7 @@ use Illuminate\Cache\Repository as CacheRepository;
|
||||||
use Illuminate\Config\Repository as ConfigRepository;
|
use Illuminate\Config\Repository as ConfigRepository;
|
||||||
use Illuminate\Contracts\Cache\Repository;
|
use Illuminate\Contracts\Cache\Repository;
|
||||||
use Illuminate\Contracts\Cache\Store;
|
use Illuminate\Contracts\Cache\Store;
|
||||||
|
use Illuminate\Contracts\Container\Container;
|
||||||
use Illuminate\Filesystem\Filesystem;
|
use Illuminate\Filesystem\Filesystem;
|
||||||
use Illuminate\Filesystem\FilesystemServiceProvider;
|
use Illuminate\Filesystem\FilesystemServiceProvider;
|
||||||
use Illuminate\Hashing\HashServiceProvider;
|
use Illuminate\Hashing\HashServiceProvider;
|
||||||
|
@ -146,9 +147,14 @@ class InstalledSite implements SiteInterface
|
||||||
|
|
||||||
$laravel->register(ExtensionServiceProvider::class);
|
$laravel->register(ExtensionServiceProvider::class);
|
||||||
|
|
||||||
foreach ($this->extenders as $extension) {
|
$laravel->booting(function (Container $app) {
|
||||||
$extension->extend($laravel);
|
// Run all local-site extenders before booting service providers
|
||||||
}
|
// (but after those from "real" extensions, which have been set up
|
||||||
|
// in a service provider above).
|
||||||
|
foreach ($this->extenders as $extension) {
|
||||||
|
$extension->extend($app);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$laravel->boot();
|
$laravel->boot();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user