-
Notifications
You must be signed in to change notification settings - Fork 418
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
Blade compiler exception after upgrade to v5.8 #890
Comments
The
That should theoretically work. |
Thanks for your reply. I set the alias as suggested but the error remains. // bootstrap/app.php
$app->withFacades();
$app->alias('blade.compiler', Illuminate\View\Compilers\BladeCompiler::class); Something must have changed since v5.7. The |
This is the PR that changed the way it was resolved was this one: laravel/framework#25497 You did register the |
I didn't, but adding it doesn't change anything. Still the same error. // bootstrap/app.php
$app->register(App\Providers\AppServiceProvider::class);
$app->register(App\Providers\AuthServiceProvider::class);
$app->register(Illuminate\View\ViewServiceProvider::class); |
I can't really help you anymore at this point. Lumen doesn't work with views out of the box so I don't know for sure what's needed to make it work. I suggest you try one of the following support channels: |
I meant Blade* |
Ok, I will keep looking into it. Thanks for your time. |
I'm not using facades, but it might help you: I trigger the initialization of the 'view' instance in my Something like: <?php
class AppServiceProvider extends ServiceProvider
{
public function boot()
{
app('view');
app('blade.compiler')->directive('my_directive', function ($expression) {
return 'my_directive output';
});
}
// ... |
Description:
After upgrading from v5.7 to v5.8 I get the following error:
ReflectionException: Class blade.compiler does not exist in ../vendor/illuminate/container/Container.php:794
.This is caused by calling the
Blade::directive()
function as shown below.The text was updated successfully, but these errors were encountered: