Skip to content

4.0.0

Latest

Choose a tag to compare

@daycry daycry released this 30 Oct 14:59
· 1 commit to master since this release

Daycry Twig 4.0.0 introduces a standalone PHP rendering toolkit and a separately installable CodeIgniter 4 adapter.

Breaking changes and installation

Framework integration now requires daycry/twig-codeigniter4:^4.0. Framework classes move to Daycry\Twig\CodeIgniter4; update application imports and configuration before upgrading from 3.x.

# Standalone PHP
composer require daycry/twig:^4.0

# CodeIgniter 4
composer require daycry/twig-codeigniter4:^4.0

Requires PHP 8.2+ and Twig 3.30+. The optional adapter requires CodeIgniter 4.7+.

Changes

  • Framework-independent configuration, rendering, discovery, warmup, persistence and optional PSR-3 logging.
  • Correct invalidation of real Twig artifacts, source warmup on fresh renderers, saved render parameters and nested template discovery.
  • Shared generation invalidation refreshes loaded templates in persistent workers; warmup preserves reusable shared artifacts.
  • Discovery hits avoid redundant metadata writes, and production CI4 rendering skips toolbar lookups.
  • Remote compiled entries with TTL zero expire after 86400 seconds to reclaim obsolete generations.

See the migration guide, installation guide and changelog.

Validation: 137 tests / 296 assertions, static analysis, style, duplicate detection and architecture checks; isolated standalone and CI4 consumers on PHP 8.2, 8.3, 8.4 and 8.5.