mirror of
https://github.com/flarum/core.git
synced 2025-10-12 15:34:26 +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
@@ -20,7 +20,7 @@ class PostServiceProvider extends AbstractServiceProvider
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->app->extend('flarum.api.throttlers', function ($throttlers) {
|
||||
$this->container->extend('flarum.api.throttlers', function ($throttlers) {
|
||||
$throttlers['postTimeout'] = function ($request) {
|
||||
if (! in_array($request->getAttribute('routeName'), ['discussions.create', 'posts.create'])) {
|
||||
return;
|
||||
@@ -46,7 +46,7 @@ class PostServiceProvider extends AbstractServiceProvider
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
CommentPost::setFormatter($this->app->make('flarum.formatter'));
|
||||
CommentPost::setFormatter($this->container->make('flarum.formatter'));
|
||||
|
||||
$this->setPostTypes();
|
||||
|
||||
|
Reference in New Issue
Block a user