Skip to content

v3.0.0

Choose a tag to compare

@daycry daycry released this 18 Sep 14:29
· 16 commits to master since this release

[3.0.0] - 2025-09-18

Added

  • Modular services: TemplateDiscovery, TemplateCacheManager, DynamicRegistry, TemplateInvalidator.
  • Documentation: Added docs/SERVICES.md detailed architecture & advanced usage guide.
  • Batch & namespace invalidation APIs: invalidateTemplates(), invalidateNamespace() + CLI twig:invalidate:batch.
  • Unregister APIs: unregisterFunction(), unregisterFilter(), unregisterExtension().
  • Runtime cache toggle: disableCache(), enableCache(), isCacheEnabled().
  • Namespace auto-escape mapping: setAutoescapeForNamespace(), removeAutoescapeForNamespace().
  • Persistent compile index & listing: listTemplates() with status and compile-index.json storage.
  • CLI utilities: twig:list, twig:stats.
  • Pattern & namespace filtering in listTemplates().

Changed

  • Internal monolithic Twig class refactored into facade delegating to new services.
  • Batch invalidation optimized to single directory traversal.
  • Logging standardized to event=twig.* key=value format using global log_message().
  • README expanded for new runtime, listing & invalidation features.

Removed

  • Internal PSR-3 logger property & setLogger() method (replaced by helper logging).
  • Direct access to internal compiled template arrays (now encapsulated in services).