PHPackages                             pc-brainy/yii2-less.php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. pc-brainy/yii2-less.php

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

pc-brainy/yii2-less.php
=======================

This is a Yii2 wrapper extension for PHP port of the official LESS processor http://lesscss.org.

099PHP

Since Jun 12Pushed 9y ago1 watchersCompare

[ Source](https://github.com/pc-brainy/yii2-less.php)[ Packagist](https://packagist.org/packages/pc-brainy/yii2-less.php)[ RSS](/packages/pc-brainy-yii2-lessphp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2 Less.php
=============

[](#yii2-lessphp)

This is a Yii2 wrapper extension for PHP port of the official LESS processor , forked from cakebake/yii2-less.php

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require --prefer-dist pc-brainy/yii2-less.php "dev-master"

```

or add

```
"pc-brainy/yii2-less.php": "dev-master"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it (without dots) in your config:

```
$config = [
    ...
    'components' => [
		...
        'assetManager' => [
            ...
            'converter' => [
                'class' => 'pc-brainy\lessphp\AssetConverter',
                'force'=> true,     // Optional: On true will convert all .less files. You can make all changes in variable.less
                'compress' => true, // Optional: You can tell less.php to remove comments and whitespace to generate minimized css files.
                'useCache' => true, // Optional: less.php will save serialized parser data for each .less file. Faster, but more memory-intense.
                //'cacheDir' => null, // Optional: is passed to the SetCacheDir() method. By default "cakebake\lessphp\runtime" is used.
                'cacheSuffix' => true, // Optional: Filename suffix to avoid the browser cache and force recompiling by configuration changes
            ],
			...
        ],
		...
	],
	...
];
```

So if it is configured you can specify your less files in asset bundle:

```
class AppAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public $css = [
        'css/site.less',
    ];
    public $js = [
    ];
    public $depends = [
    ];
}
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1fb9312c4c7356d156a8c8f5da7661c2ea2aac1f8e33211df521d36e9529998e?d=identicon)[pc-brainy](/maintainers/pc-brainy)

---

Top Contributors

[![pc-brainy](https://avatars.githubusercontent.com/u/13269904?v=4)](https://github.com/pc-brainy "pc-brainy (7 commits)")[![cakebake](https://avatars.githubusercontent.com/u/7462226?v=4)](https://github.com/cakebake "cakebake (6 commits)")

### Embed Badge

![Health badge](/badges/pc-brainy-yii2-lessphp/health.svg)

```
[![Health](https://phpackages.com/badges/pc-brainy-yii2-lessphp/health.svg)](https://phpackages.com/packages/pc-brainy-yii2-lessphp)
```

###  Alternatives

[codenco-dev/nova-grid-system

A Laravel Nova tool to have a grid system

80300.1k](/packages/codenco-dev-nova-grid-system)[mageplaza/module-share-cart

Magento 2 Share Cart extension

12182.8k2](/packages/mageplaza-module-share-cart)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
