Daycry Twig¶
Twig template rendering for standalone PHP and CodeIgniter 4, with cache warmup, discovery, invalidation and diagnostics.
Install the core Use CodeIgniter 4
PHP 8.2+ | Twig 3.30+ | Optional CodeIgniter 4.7+
-
Standalone PHP
Configure template paths, use native Twig loaders, register functions and filters, and inject a PSR-3 logger without loading a framework.
-
CodeIgniter 4 integration
Add shared services, configuration, rendering helpers, Spark commands, cache-service support and the debug toolbar with the optional adapter.
-
Cache lifecycle
Compile source without rendering, invalidate actual Twig artifacts and refresh template generations in persistent workers.
-
Discovery and diagnostics
Discover templates, inspect rendering profiles and choose a lean capability profile or deployment-versioned discovery for your application.
Choose your package¶
| Package | Use it for |
|---|---|
daycry/twig |
Standalone PHP rendering and shared template tooling |
daycry/twig-codeigniter4 |
CodeIgniter 4 integration; installs the core and framework dependency |
Both packages are developed in daycry/twig.
The adapter distribution is generated from packages/codeigniter4.
Quick start¶
Follow the installation guide to create the first template and configure a cache path. Upgrading a 3.x application? Start with the 4.0 migration guide because framework namespaces change.