If you want to use Assetic with LESS support in shared hosting or in a server without node.js you might want to try lessphp.
The installation is quite simple.
- Add lessphp to your Composer dependencies (
php composer.phar require oyejorge/less.php)
Update your Symfony configuration (usually
app/config/config.yml):1234567assetic:filters:cssrewrite: ~lessphp:apply_to: "\.less$"file: %kernel.root_dir%/../vendor/oyejorge/less.php/lessc.inc.php
Include your less files via twig into your templates, and you’re done!
Keep in mind that lessphp may not include all the new features of lesscss but it is possible to use it in most situations.
- [How to use Assetic in Shared Hosting]