mirror of
https://github.com/flarum/core.git
synced 2025-10-12 15:34:26 +02:00
Split up Application and Container
- Stop trying to implement Laravel's Application contract, which has no value for us. - Stop inheriting from the Container, injecting one works equally well and does not clutter up the interfaces. - Inject the Paths collection instead of unwrapping it again, for better encapsulation. This brings us one step closer toward upgrading our Laravel components (#2055), because we no longer need to adopt the changes to the Application contract.
This commit is contained in:
@@ -11,7 +11,6 @@ namespace Flarum\Extension;
|
||||
|
||||
use Flarum\Extension\Event\Disabling;
|
||||
use Flarum\Foundation\AbstractServiceProvider;
|
||||
use Illuminate\Contracts\Container\Container;
|
||||
|
||||
class ExtensionServiceProvider extends AbstractServiceProvider
|
||||
{
|
||||
@@ -27,8 +26,8 @@ class ExtensionServiceProvider extends AbstractServiceProvider
|
||||
// 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 boots up (and starts resolving services).
|
||||
$this->app->booting(function (Container $app) {
|
||||
$app->make('flarum.extensions')->extend($app);
|
||||
$this->app['flarum']->booting(function () {
|
||||
$this->app->make('flarum.extensions')->extend($this->app);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user