Skip to content

Releases: squirrelphp/twig-php-syntax

Avoid deprecations up to Twig 3.15

20 Nov 18:58
Compare
Choose a tag to compare

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

01 May 12:20
Compare
Choose a tag to compare

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

29 Nov 23:32
Compare
Choose a tag to compare

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

Avoid PHP warnings for break & continue

26 Jan 18:12
Compare
Choose a tag to compare

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

15 Jul 14:08
Compare
Choose a tag to compare
Otherwise the variable might not be defined and
lead to a PHP notice.

Lower minimum PHP version

10 Jun 19:18
Compare
Choose a tag to compare

Make this library work with PHP >= 7.2.5 instead of only supporting PHP 7.4 and higher.

Add PHP conversion functions

08 Jun 11:01
Compare
Choose a tag to compare
  • intval
  • floatval
  • strval
  • boolval

v1.3

07 Jun 15:05
Compare
Choose a tag to compare
Add strtotime filter

Add more tests known from PHP

10 May 13:41
Compare
Choose a tag to compare

Add the variable type tests from PHP as twig tests, and adjust documentation.

Documentation & config improvements

23 Apr 14:57
Compare
Choose a tag to compare

Corrected small details in the documentation to make it clearer, and improved the travis and code quality configuration to make it more future proof.