TwigBridge icon indicating copy to clipboard operation
TwigBridge copied to clipboard

Twig 2.0 breaks TwigBridge/Twig/Loader

Open dieterve opened this issue 8 years ago • 9 comments

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.

dieterve avatar Jan 06 '17 11:01 dieterve

Yeah Twig had some late-minute breaking changes :(

barryvdh avatar Jan 06 '17 15:01 barryvdh

Is Twig 2.0 compatibility still in the works?

tyteen4a03 avatar Mar 24 '17 16:03 tyteen4a03

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

schmidex avatar Apr 18 '17 10:04 schmidex

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

barryvdh avatar Apr 18 '17 10:04 barryvdh

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

lbausch avatar Jul 24 '17 08:07 lbausch

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.

ascii-soup avatar Jul 25 '17 10:07 ascii-soup

Any updates on this?

tyteen4a03 avatar Nov 28 '17 23:11 tyteen4a03

Bumping for 2018.

tyteen4a03 avatar Jan 24 '18 00:01 tyteen4a03

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

tyteen4a03 avatar Apr 12 '18 22:04 tyteen4a03