mirror of
https://github.com/flarum/core.git
synced 2025-08-17 13:54:18 +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
@@ -21,13 +21,13 @@ class FormatterServiceProvider extends AbstractServiceProvider
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->app->singleton('flarum.formatter', function (Container $container) {
|
||||
$this->container->singleton('flarum.formatter', function (Container $container) {
|
||||
return new Formatter(
|
||||
new Repository($container->make('cache.filestore')),
|
||||
$this->app[Paths::class]->storage.'/formatter'
|
||||
$this->container[Paths::class]->storage.'/formatter'
|
||||
);
|
||||
});
|
||||
|
||||
$this->app->alias('flarum.formatter', Formatter::class);
|
||||
$this->container->alias('flarum.formatter', Formatter::class);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user