Alex

Results 951 comments of Alex

That unconditional constructor injection problem was one of the reasons (IMO) behind controller action dependency injection feature in Laravel 5. So you can have say `public function show($id, FormBuilder $form)`...

> Regarding the method injection, not sure what that has to do with Twig extensions? I wrote about it to tell, that there is an alternative to constructor injection at...

> You can use the `TwigBridge\Extension\Loader\Facade\Caller` which works the same way (Form.open() vs form_open()), instead of loading the form (and other) extensions. Interesting, I'll try that. Are you using `TwigBridge`...

It appears, that I need to declare all Facades twice (once in `config/app.php` in `aliases` array and in `extensions.php` of TwigBridge to make it work.

I've created PR: #153 where I'll populate all facades that have extensions for them. This way it's easier to get started.

Same happens when I try to create twig file and use it: ![laravel_twigbrige_fatalerror](https://cloud.githubusercontent.com/assets/1277526/4445175/4b3db880-47f7-11e4-84e9-6d5a10ff7090.png)

I guess it's Laravel itself who is trying to inject dependencies and fails. If that `$csrfToken` argument was there all the time, then I wonder how this could be working...

If I'd only knew what was making it work in Laravel 4.2 in the first place knowing that constructor declaration of FormBuilder was the same all the time.

I've echoed some debug into in `Container::getDependencies` method (https://github.com/laravel/framework/blob/4.2/src/Illuminate/Container/Container.php#L549) in both Laravel version to see what's actually being resolved and here are the results: Laravel 4.2: ``` → artisan ide-helper:generate...

Here is the gist containing the `config/app.php` from both Laravel installations: https://gist.github.com/aik099/bfd82feb6c1680277500