Twig extension doesn't work since Twig 3.9.0
toxpal opened this issue · 5 comments
Since https://github.com/voku/html-compress-twig has no "Issues" section, I hope it's ok to post issue here.
The last version of Twig where HtmlMin extension works is 3.8.0. Upgrading to any later version doesn't cause any errors, but source code is not minified. I suspect it has something to do with changes to internal functions in Twig - https://github.com/twigphp/Twig/blob/3.x/CHANGELOG, for example:
* Deprecate all internal extension functions in favor of methods on the extension classes
* Mark all extension functions as @internal
Any chance we will get it working on Twig 3.9.0 and later?
Since https://github.com/voku/html-compress-twig has no "Issues" section, I hope it's ok to post issue here.
The last version of Twig where HtmlMin extension works is 3.8.0. Upgrading to any later version doesn't cause any errors, but source code is not minified. I suspect it has something to do with changes to internal functions in Twig - https://github.com/twigphp/Twig/blob/3.x/CHANGELOG, for example:
* Deprecate all internal extension functions in favor of methods on the extension classes * Mark all extension functions as @internal
Any chance we will get it working on Twig 3.9.0 and later?
@toxpal I used Twig 4.5.1 in Symfony 7.1 and I use HtmlMin 4.5.1 to minify Twig output and I have no issue with that.
I used Twig 4.5.1 in Symfony 7.1
Are you sure? The latest version of Twig is 3.10.4, v4.0.0 is in early development, and v4.5.1 doesn't seem to exist?
P.S. I'm using the extension, not standalone HtmlMin
I used Twig 4.5.1 in Symfony 7.1
Are you sure? The latest version of Twig is 3.10.4, v4.0.0 is in early development, and v4.5.1 doesn't seem to exist?
P.S. I'm using the extension, not standalone HtmlMin
This the versions that I have used:
- Twig: https://github.com/twigphp/Twig/releases/tag/v3.10.3
- HtmlMin: https://github.com/voku/HtmlMin/releases/tag/4.5.1
I used it in symfony 7.1
and the minify operations done without any noted problem.
Well, for some reason Twig extension of HtmlMin stops working when Twig version newer than 3.8.0 is used.
After updating to Twig 3.12.0 extension automatically started working again. No other changes were made...