mirror of
https://github.com/flarum/framework.git
synced 2025-01-20 05:32:49 +08:00
View extender: Do not resolve factory
Not all requests need this factory, so there is no need to instantiate one and load the required files. Refs #1891, #2134.
This commit is contained in:
parent
b5e891df30
commit
7e3d71a0a0
|
@ -42,10 +42,10 @@ class ViewNamespace implements ExtenderInterface
|
|||
|
||||
public function extend(Container $container, Extension $extension = null)
|
||||
{
|
||||
$factory = $container->make(Factory::class);
|
||||
|
||||
foreach ($this->adds as $namespace => $hints) {
|
||||
$factory->addNamespace($namespace, $hints);
|
||||
}
|
||||
$container->resolving(Factory::class, function (Factory $view) {
|
||||
foreach ($this->adds as $namespace => $hints) {
|
||||
$view->addNamespace($namespace, $hints);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user