TwigBridge icon indicating copy to clipboard operation
TwigBridge copied to clipboard

Latest Laravel 5 issue: ReflectionException (-1) Class view does not exist

Open vitalniko opened this issue 11 years ago • 5 comments
trafficstars

After the last composer update i get the following exception ReflectionException (-1) Class view does not exist

As i suppose the code to blame is rcrowe/twigbridge/src/ServiceProvider.php Line 51 $this->app['view']->addExtension(

I guess the view reference was changed

vitalniko avatar Oct 17 '14 04:10 vitalniko

Added parent::register () To the register method of the ServiceProvider It helped

vitalniko avatar Oct 17 '14 05:10 vitalniko

But than comes another one Cannot instantiate Twig extension 'TwigBridge\Extension\Laravel\Form': Unresolvable dependency resolving [Parameter #2 [ $csrfToken ]] in class Illuminate\Html\FormBuilder

vitalniko avatar Oct 17 '14 05:10 vitalniko

Yes the form /html extensions don't work yet zinc they are moved to a different package.

barryvdh avatar Oct 17 '14 05:10 barryvdh

I replaced the constructor of Laravel/Form extension for the public function __construct() { // $this->form = $form; $this->form = new \Illuminate\Html\FormBuilder( \App::make('Illuminate\Html\HtmlBuilder'), \App::make('Illuminate\Routing\UrlGenerator'), csrf_token() ); }

As @rcrowe wrote here #150

And it works )

vitalniko avatar Oct 17 '14 05:10 vitalniko

ran into the same issue today. is it possible to bring a fix back in the the 0.7 branch? quite annoying thing for now.. :)

DaHaiz avatar Feb 22 '15 18:02 DaHaiz