Skip to content

Commit 4b60ec3

Browse files
authored
do not use app() foundation helper (#51522)
1 parent ac9b6fa commit 4b60ec3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Illuminate/View/ViewServiceProvider.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Illuminate\View;
44

5+
use Illuminate\Container\Container;
56
use Illuminate\Support\ServiceProvider;
67
use Illuminate\View\Compilers\BladeCompiler;
78
use Illuminate\View\Engines\CompilerEngine;
@@ -135,7 +136,7 @@ public function registerEngineResolver()
135136
public function registerFileEngine($resolver)
136137
{
137138
$resolver->register('file', function () {
138-
return new FileEngine(app()->make('files'));
139+
return new FileEngine(Container::getInstance()->make('files'));
139140
});
140141
}
141142

@@ -148,7 +149,7 @@ public function registerFileEngine($resolver)
148149
public function registerPhpEngine($resolver)
149150
{
150151
$resolver->register('php', function () {
151-
return new PhpEngine(app()->make('files'));
152+
return new PhpEngine(Container::getInstance()->make('files'));
152153
});
153154
}
154155

@@ -161,7 +162,7 @@ public function registerPhpEngine($resolver)
161162
public function registerBladeEngine($resolver)
162163
{
163164
$resolver->register('blade', function () {
164-
$app = app();
165+
$app = Container::getInstance();
165166

166167
$compiler = new CompilerEngine(
167168
$app->make('blade.compiler'),

0 commit comments

Comments
 (0)