TwigBridge icon indicating copy to clipboard operation
TwigBridge copied to clipboard

Create a develop branch to work towards laravel 4.3 compat.

Open trq opened this issue 10 years ago • 12 comments

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

trq avatar Sep 01 '14 00:09 trq

What are the breaking changes exactly? If it's just the html extension, we could disable that by default.

barryvdh avatar Sep 01 '14 05:09 barryvdh

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.

ingro avatar Sep 10 '14 10:09 ingro

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 [ $csrfToken ]] in class Illuminate\Html\FormBuilder I will report if I found more issues.

— Reply to this email directly or view it on GitHub.

rcrowe avatar Sep 10 '14 10:09 rcrowe

Good! Do you think you will create another branch to support Laravel 4.3?

ingro avatar Sep 10 '14 18:09 ingro

Probably just remove those extensions by default, no need for a seperate repo.

barryvdh avatar Sep 10 '14 18:09 barryvdh

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

ingro avatar Sep 10 '14 18:09 ingro

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"
    },

glennjacobs avatar Sep 15 '14 14:09 glennjacobs

Pushed a fix to allow 5.0.x

barryvdh avatar Sep 15 '14 15:09 barryvdh

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

barryvdh avatar Sep 16 '14 07:09 barryvdh

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.

pprins avatar Sep 24 '14 14:09 pprins

Maybe a little dirty, but it's works for me — PR #151.

jhaoda avatar Sep 30 '14 09:09 jhaoda

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 ..."

billmn avatar Oct 13 '14 10:10 billmn