From f3aca75475f7d352d2497203c166c30d0cd2408e Mon Sep 17 00:00:00 2001 From: Rodrigo Pedra Brum Date: Tue, 21 May 2024 08:30:17 -0300 Subject: [PATCH] do not use app() foundation helper --- src/Illuminate/View/ViewServiceProvider.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Illuminate/View/ViewServiceProvider.php b/src/Illuminate/View/ViewServiceProvider.php index bfdc27ac7e41..41cd8b93c9aa 100755 --- a/src/Illuminate/View/ViewServiceProvider.php +++ b/src/Illuminate/View/ViewServiceProvider.php @@ -2,6 +2,7 @@ namespace Illuminate\View; +use Illuminate\Container\Container; use Illuminate\Support\ServiceProvider; use Illuminate\View\Compilers\BladeCompiler; use Illuminate\View\Engines\CompilerEngine; @@ -135,7 +136,7 @@ public function registerEngineResolver() public function registerFileEngine($resolver) { $resolver->register('file', function () { - return new FileEngine(app()->make('files')); + return new FileEngine(Container::getInstance()->make('files')); }); } @@ -148,7 +149,7 @@ public function registerFileEngine($resolver) public function registerPhpEngine($resolver) { $resolver->register('php', function () { - return new PhpEngine(app()->make('files')); + return new PhpEngine(Container::getInstance()->make('files')); }); } @@ -161,7 +162,7 @@ public function registerPhpEngine($resolver) public function registerBladeEngine($resolver) { $resolver->register('blade', function () { - $app = app(); + $app = Container::getInstance(); $compiler = new CompilerEngine( $app->make('blade.compiler'),