This is a Twig extension for Symfony Framework to make greentext green.
composer require linnit/greentext
or update your composer.json
"require": {
"linnit/greentext": "1.*"
}
Add the extension to Symfony
# app/config/services.yml
linnit.twig.greentext:
class: Linnit\Twig\Extension\GreenTextExtension
tags: ['twig.extension']
Standard greentext
{{ message|greentext }}
Specify your own colour
{{ message|greentext("#772953") }}
To test, just run phpunit
./vendor/phpunit/phpunit/phpunit