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

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

Open
vitalniko opened this issue Oct 17, 2014 · 5 comments

Comments

@vitalniko
Copy link

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
Copy link
Author

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

@vitalniko
Copy link
Author

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

@barryvdh
Copy link
Collaborator

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

@vitalniko
Copy link
Author

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 )

@DaHaiz
Copy link

DaHaiz commented Feb 22, 2015

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.. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants