BehatHtmlFormatterPlugin icon indicating copy to clipboard operation
BehatHtmlFormatterPlugin copied to clipboard

Support Twig 3.x

Open BrianWalters opened this issue 4 years ago • 6 comments

Currently, this plugin is restricted to "twig/twig":"~1.5|~2.0". Would be great to have support for ~3.0 as well. I tested by making a fork and running it on my project, and there seems to be some namespace changes that need to be made. In the .twig template itself, i don't see any syntax that was deprecated from Twig 2 to 3, so it should be fine on that front.

Also, I can run this formatter with the Behat2 option without needing Twig at all. This would also be fine for my Twig 3 project (still much better than the default .txt file). Could Twig be an optional dependency perhaps?

BrianWalters avatar Apr 30 '21 17:04 BrianWalters

+1

ikallali avatar Jul 12 '21 13:07 ikallali

i highly appreciate updating dependencies to the next major version. For me its okay to make a breaking change for the old use use cases since this repo isnt updated regularly. Also its recommended in the current state that you choose your "release" by commit hash. Sorry but the master is the best availaible and we should support moving forward a lot.

Feel free to open a PR. I dont like "optional" dependencies because it needs additional work of users of the package if this package has a default twig renderer. But if Twig3 is a dependencies just add it as that and remove the old versions.

PurHur avatar Jul 14 '21 13:07 PurHur

+1

chadyred avatar Sep 18 '21 14:09 chadyred

Hi,

I made PR #127 because I needed it for a project. Feel free to update. I made it in quick and dirty mode and do not have time to investigate further.

Thanks and take care

floviolleau avatar Feb 09 '22 09:02 floviolleau

Having support for twig 3.x would be really nice

Jurkovic avatar Mar 03 '22 07:03 Jurkovic

Hi,

For me, now, it is working fine.

Would be nice if @dutchiexl could merge it 😉.

Thanks

floviolleau avatar Mar 03 '22 22:03 floviolleau

See branch 2.0 or tag v2.0.0

PurHur avatar Mar 21 '23 13:03 PurHur