piedweb / splates
Splates, a native PHP template inspired by twig system that's fast, easy to use and easy to extend.
Requires
- php: ^8.3
- phpstan/phpstan: ^2.0
- symfony/var-dumper: ^7.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.65
- mikey179/vfsstream: ^1.6
- phpunit/phpunit: ^9.5
- rector/rector: ^2.0
This package is auto-updated.
Last update: 2024-12-16 19:02:23 UTC
README
WIP : fork of league/plates. The main goal is to enable PHPStan support for templates and ensure IDE code completion works seamlessly without additional effort.
Splates is a native PHP template system that's fast, easy to use and easy to extend. It's inspired by the excellent Twig template engine and strives to bring modern template language functionality to native PHP templates. Splates is designed for developers who prefer to use native PHP templates over compiled template languages.
Highlights
- Native PHP templates, no new syntax to learn
- ... coming with native IDE autocompletion and static analysis without extra work to your templates
- Plates is a template system, not a template language
- Increase code reuse with template layouts and inheritance
- Data sharing across templates
- Preassign data to specific templates
- Built-in escaping helpers
- Framework-agnostic, will work with any project. Heavily tested with Symfony.
- Decoupled design makes templates easy to test
- Composer ready and PSR-2 compliant
Dropped feature from league/plates
- Drop
insert
➜ prefer<?=$f(...)?>
- Drop uri extension
- Simplify internal api dropping a lot of get* and set* for public method
Installation
Splates is available via Composer:
composer require piedweb/splates
Documentation
Full documentation is not writed yet. Look at plates docs .
Developpment
composer test
composer format
composer stan
composer rector
Contributing
Please see CONTRIBUTING for details.
Credits
- Robin D. ak. Pied Web (Current Maintener)
- RJ Garcia (Current Maintainer of
league/plates
) - Jonathan Reinink (Original Author of
league/plates
) - All Contributors
License
The MIT License (MIT). Please see License File for more information.