NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #946 most downloaded on Packagist
Adds common PHP syntax to twig templates, like ===, foreach and continue/break.
Latest stable
v1.5.1
Last release 9 months ago
27 Jan 2026
Release timing varies
gaps range from 2 weeks to 2.4 years
Most releases are documented
notes for 14 of 16 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
16 releases · first in 2020
Drag across the ruler to compare, or tap a release to open it.
Check if loop exists for continue
Check if loop exists for continue
Otherwise the variable might not be defined and
lead to a PHP notice.
Twig provides === and !== natively in version >=3.23, so this release removes that functionality while requiring Twig v3.23 - for users of this librar
Twig provides === and !== natively in version >=3.23, so this release removes that functionality while requiring Twig v3.23 - for users of this library this does not change anything.
This is a new major version mainly because of the removed classes and because all classes are considered sealed now. The functionality stays the same.
As Twig is preparing for v4.0 there are quite a few internal changes that affects this library slightly. This release fixes those up to the current Tw
Your coding agent can read these notes before it upgrades. Set up the MCP server →
As Twig is preparing for v4.0 there are quite a few internal changes that affects this library slightly. This release fixes those up to the current Twig v3.15 version. We also require at least PHP 8.0.2 to match the identical requirements in Twig v3.15.
No new features were added, and no behavior change within the library.
Avoid deprecations warnings in Twig >=3.9 by adding the YieldReady attributes to BreakNode and ContinueNode.
Avoid deprecations warnings in Twig >=3.9 by adding the YieldReady attributes to BreakNode and ContinueNode.
Make Twig 3.9 the minimum version for this version and upgrade dependencies and tests.
The missing type hints lead to deprecation notices about possibly upcoming type hints in Twig.
The missing type hints lead to deprecation notices about possibly upcoming type hints in Twig.
Our previous mechanism of doing a "lookbehind" with twig lead to array key notices/warnings. Instead we now look ahead, which is also valid from the p
Our previous mechanism of doing a "lookbehind" with twig lead to array key notices/warnings. Instead we now look ahead, which is also valid from the perspective of twig, to determine if more loops are ending than closing, and for break if enough loops are ending to break out of.
Make this library work with PHP >= 7.2.5 instead of only supporting PHP 7.4 and higher.
Make this library work with PHP >= 7.2.5 instead of only supporting PHP 7.4 and higher.
- intval - floatval - strval - boolval
Nothing published for this version
Add the variable type tests from PHP as twig tests, and adjust documentation.
Add the variable type tests from PHP as twig tests, and adjust documentation.
Add our own version of an internal Twig class to be more resilient if that internal class gets changed.
Add our own version of an internal Twig class to be more resilient if that internal class gets changed.
Remove the use of deprecated methods and token types and increase minimum PHP version to 8.1 like Twig 3.21 did.
Remove the use of deprecated methods and token types and increase minimum PHP version to 8.1 like Twig 3.21 did.
Redefines ForeachTokenParser::parseAssignmentExpression slightly to account for new protected function of the same name in Twig. Thanks to @shyim for
Redefines ForeachTokenParser::parseAssignmentExpression slightly to account for new protected function of the same name in Twig. Thanks to @shyim for noticing and providing a pull request.
Use the ForElseNode for our foreach construct to avoid a new deprecation notice in twig 3.19.
Use the ForElseNode for our foreach construct to avoid a new deprecation notice in twig 3.19.
Corrected small details in the documentation to make it clearer, and improved the travis and code quality configuration to make it more future proof.
Corrected small details in the documentation to make it clearer, and improved the travis and code quality configuration to make it more future proof.
Nothing published for this version
One column per quarter.