TwigBridge
TwigBridge copied to clipboard
Create a develop branch to work towards laravel 4.3 compat.
Can you please start a develop branch and alias it in composer.json to 0.7.dev so that we can start making 4.3 compat changes.
For starters, the Illuminate\Html namespace needs to be defined as a separate dependency.
While doing so also create a 0.6.2 tag that locks illuminate\support and illuminate\view down to ~4.2.0 (at least the latest 0.6.* version won't be broken then).
What are the breaking changes exactly? If it's just the html extension, we could disable that by default.
Well Illuminate\Html has been stripped out from the framework so you have to manually require it at this time. Moreover I had to comment out 'TwigBridge\Extension\Laravel\Form', from the enabled extensions in the package's config file because it gave me this error when trying to display a view (even if it wasn't using a form tag):
Unresolvable dependency resolving [Parameter #2 [ <required> $csrfToken ]] in class Illuminate\Html\FormBuilder
I will report if I found more issues.
I’ll accept pull requests fixing these issues.
When I get some spare time I’ll get this fixed before the 4.3 release.
On 10 September 2014 at 11:09:39, Emanuele Ingrosso ([email protected]) wrote:
Well Illuminate\Html has been stripped out from the framework so you have to manually require it at this time. Moreover I had to comment out 'TwigBridge\Extension\Laravel\Form', from the enabled extensions in the package's config file because it gave me that error when trying to display a view (even if it wasn't using a form tag):
Unresolvable dependency resolving [Parameter #2 [
— Reply to this email directly or view it on GitHub.
Good! Do you think you will create another branch to support Laravel 4.3?
Probably just remove those extensions by default, no need for a seperate repo.
I guess that will do, anyway you could add a suggestion in composer.json to install illuminate/html (after the bugs has been resolved of course).
Now that Laravel 4.3 has been renamed Laravel 5 it can no longer be installed via composer. Can the composer.json be updated to something like
"require": {
"php": ">=5.4.0",
"twig/twig": "~1.15",
"illuminate/support": ">=4.1",
"illuminate/view": ">=4.1"
},
Pushed a fix to allow 5.0.x
I've also added a try/catch to catch errors when calling app->make(), so it will be more clear why it is failing. Shouldn't be too much of a problem right? Will wait for the progress in 5.x
Just to let you or someone else know, I have it working with only commenting out the folowing 2 lines in [laravel5]/config/packages/rcrowe/twigbridge/extensions.php:
// 'TwigBridge\Extension\Laravel\Form',
// 'TwigBridge\Extension\Laravel\Html',
The Html and Form is only available as a seperate package in Laravel 5 so these should be optional in TwigBridge I think.
Maybe a little dirty, but it's works for me — PR #151.
Agree to create a develop branch for L5. This can be useful not only for some compatibility changes but also for the README.
Some commands, paths, etc. are changed in L5, eg. "php artisan publish:config ..."