rcrowe / TwigBridge

Give the power of Twig to Laravel
MIT License
895 stars 165 forks source link

Twig 2.0 breaks TwigBridge/Twig/Loader #298

Open dieterve opened 7 years ago

dieterve commented 7 years ago

TwigBridge\Twig\Loader is implementing Twig_LoaderInterface which requires the method getSourceContext to be implemented:

FatalErrorException in Loader.php line 24:
Class TwigBridge\Twig\Loader contains 1 abstract method and must therefore be 
declared abstract or implement the remaining methods (Twig_LoaderInterface::getSourceContext)

This start happening after a composer update which bumped my Laravel project twig version:

 - Removing twig/twig (v1.27.0)
  - Installing twig/twig (v2.0.0)
    Downloading: 100%

I locked my version of twig to 1.30 to workaround this.

barryvdh commented 7 years ago

Yeah Twig had some late-minute breaking changes :(

tyteen4a03 commented 7 years ago

Is Twig 2.0 compatibility still in the works?

schmidex commented 7 years ago

Any update @barryvdh ? Since the missing method got added to TwigBrigde/Twig/Loader this seems to work fine.

barryvdh commented 7 years ago

For now stick with v1. I'll try to create a new version soon.

lbausch commented 6 years ago

@barryvdh Did you manage to make progress on this or can we provide help? :)

ascii-soup commented 6 years ago

Seems to work for us as-is on master; I forked to change the twig dep to v2 in the composer.json, just waiting for the same to be added upstream here before we can switch back.

tyteen4a03 commented 6 years ago

Any updates on this?

tyteen4a03 commented 6 years ago

Bumping for 2018.

tyteen4a03 commented 6 years ago

@barryvdh One year on - any news on this? :)