Skip to content

Releases: squirrelphp/twig-php-syntax

Remove ===/!== and seal internal classes

Choose a tag to compare

@iquito iquito released this 27 Jan 09:28

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.

Replace internal Twig class

Choose a tag to compare

@iquito iquito released this 03 May 06:42

Add our own version of an internal Twig class to be more resilient if that internal class gets changed.

More changes for Twig 3.21

Choose a tag to compare

@iquito iquito released this 02 May 17:09

Remove the use of deprecated methods and token types and increase minimum PHP version to 8.1 like Twig 3.21 did.

Fix incompatibility with Twig v3.21

Choose a tag to compare

@iquito iquito released this 02 May 14:33
5283b9a

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.

Avoid deprecation in Twig 3.19

Choose a tag to compare

@iquito iquito released this 30 Jan 09:48

Use the ForElseNode for our foreach construct to avoid a new deprecation notice in twig 3.19.

Avoid deprecations up to Twig 3.15

Choose a tag to compare

@iquito iquito released this 20 Nov 18:58

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.

Add YieldReady attributes

Choose a tag to compare

@iquito iquito released this 01 May 12:20

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.

Add missing type hints

Choose a tag to compare

@iquito iquito released this 29 Nov 23:32

The missing type hints lead to deprecation notices about possibly upcoming type hints in Twig.

Avoid PHP warnings for break & continue

Choose a tag to compare

@iquito iquito released this 26 Jan 18:12

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.

v1.5.1: Check if loop exists for continue

Choose a tag to compare

@iquito iquito released this 15 Jul 14:08
Otherwise the variable might not be defined and
lead to a PHP notice.