Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Do not use app() Foundation helper on ViewServiceProvider #51522

Merged
merged 1 commit into from
May 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/Illuminate/View/ViewServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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'));
});
}

Expand All @@ -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'));
});
}

Expand All @@ -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'),
Expand Down