Closed imhmdb closed 5 years ago
Hmm, interesting, \Illuminate\Contracts\View\Engine
doesn't mention getCompiler()
at all (including the first version the interface
was introduced).
Feels like if the \Illuminate\View\Engines\CompilerEngine::getCompiler
method is intended for public consumption, it should be part of the interface, since that's what interfaces are for (to ensure Liskov substitution principle) :/
Will review fix #9 next.
Fixed in #9 .
we're using a library that uses the laravel blade compiler to add directives like this:
$blade = app('view')->getEngineResolver()->resolve('blade')->getCompiler();
when I installed scout-apm-laravel package the application stopped working because the ScoutViewEngineDecorator does not implement the public function getCompiler of the realEngine Illuminate\View\Engines\CompilerEnginethis is what the logs were showing: Call to undefined method Scoutapm\Laravel\Events\ScoutViewEngineDecorator::getCompiler() {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to undefined method
as a test I tried adding this method to ScoutViewEngineDecorator and everything started working again.