josbeir / sugar
A fun and safe PHP templating engine
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 1
pkg:composer/josbeir/sugar
Requires
- php: >=8.2
Requires (Dev)
- cakephp/cakephp-codesniffer: ^5.3
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.1.3 || ^12.0 || ^13.0
- rector/rector: ^2.3
This package is auto-updated.
Last update: 2026-02-13 15:07:50 UTC
README
A modern PHP (8.2+) templating engine that compiles to pure PHP. Sugar keeps native PHP and HTML intact while adding s: attributes for control flow, context-aware escaping, pipe syntax (|>) for helpers (a PHP 8.5 feature supported on 8.2+), and composable helpers. Write templates the way you already do, then let the compiler turn them into fast PHP that runs with zero runtime overhead.
Warning
Sugar is under active development. Core features are stable, but the API may change before 1.0.
Documentation and more information
Read the Documentation
License
Sugar is licensed under the MIT License. See LICENSE.
Contributing
Contributions are welcome. Please read Contributing for setup steps and guidelines.