Open askvortsov1 opened 3 years ago
It wouldn't be in core, but now that Laravel Octane is in beta, we might want to look into it as a potential extension. WRT to core, one of the changes I've seen in Laravel packages is using the value of $container passed into closures as an argument as opposed to reusing $this->container
in service providers.
From Franz in https://github.com/flarum/core/issues/2307#issuecomment-698836620:
As pointed out above, Flarum is doing a relatively good job so far in terms of keeping per-request state separated from application state. However, there are still several places where we could be doing better. For now, the goal of this issue will be to catalogue these places and discuss how they could be improved.
SetLocale
middleware sets the current user's locale as a property on the globalLocaleManager
singletonDiscussion
has a staticsetStateUser
method. Should be eliminatable via https://github.com/flarum/core/issues/1321