dutchiexl / BehatHtmlFormatterPlugin

This is a behat plugin to generate HTML reports
MIT License
112 stars 117 forks source link

Support Twig 3.x #122

Closed BrianWalters closed 1 year ago

BrianWalters commented 3 years ago

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?

ikallali commented 3 years ago

+1

PurHur commented 3 years ago

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.

chadyred commented 2 years ago

+1

floviolleau commented 2 years ago

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

Jurkovic commented 2 years ago

Having support for twig 3.x would be really nice

floviolleau commented 2 years ago

Hi,

For me, now, it is working fine.

Would be nice if @dutchiexl could merge it 😉.

Thanks

PurHur commented 1 year ago

See branch 2.0 or tag v2.0.0