mirror of
https://github.com/flarum/core.git
synced 2025-10-12 23:44:27 +02:00
Rename app
to container (#2609)
* Rename `app` helper to `resolve`, deprecate old version * Rename $this->app to $this->container in service providers We no longer couple Flarum\Foundation\Application to the Laravel container; instead, we use the container separately. Changing our naming to reflect that will make things clearer.
This commit is contained in:
committed by
GitHub
parent
15cbe4daaa
commit
c81f629b0b
@@ -19,18 +19,18 @@ class BusServiceProvider extends AbstractServiceProvider
|
||||
{
|
||||
public function register()
|
||||
{
|
||||
$this->app->bind(BaseDispatcher::class, function ($app) {
|
||||
return new Dispatcher($app, function ($connection = null) use ($app) {
|
||||
return $app[QueueFactoryContract::class]->connection($connection);
|
||||
$this->container->bind(BaseDispatcher::class, function ($container) {
|
||||
return new Dispatcher($container, function ($connection = null) use ($container) {
|
||||
return $container[QueueFactoryContract::class]->connection($connection);
|
||||
});
|
||||
});
|
||||
|
||||
$this->app->alias(
|
||||
$this->container->alias(
|
||||
BaseDispatcher::class,
|
||||
DispatcherContract::class
|
||||
);
|
||||
|
||||
$this->app->alias(
|
||||
$this->container->alias(
|
||||
BaseDispatcher::class,
|
||||
QueueingDispatcherContract::class
|
||||
);
|
||||
|
Reference in New Issue
Block a user