PHPackages                             ogheo/yii2-htmlcompress - 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. [Templating &amp; Views](/categories/templating)
4. /
5. ogheo/yii2-htmlcompress

ActiveYii2-extension[Templating &amp; Views](/categories/templating)

ogheo/yii2-htmlcompress
=======================

Compress HTML output into a single line

1.1.0(8y ago)20184.4k—6.8%12[2 issues](https://github.com/ogheo/yii2-htmlcompress/issues)1MITPHP

Since Oct 13Pushed 8y ago5 watchersCompare

[ Source](https://github.com/ogheo/yii2-htmlcompress)[ Packagist](https://packagist.org/packages/ogheo/yii2-htmlcompress)[ Docs](https://github.com/ogheo/yii2-htmlcompress)[ RSS](/packages/ogheo-yii2-htmlcompress/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (8)Used By (1)

yii2-htmlcompress [![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE) [![Scrutinizer](https://camo.githubusercontent.com/fd53bd0646d4a3efb82e1ca54aef19af6fe5a68f1dfd94a3363cd2dd5a2c1054/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6f6768656f2f796969322d68746d6c636f6d70726573732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/ogheo/yii2-htmlcompress/)
============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#yii2-htmlcompress--)

Compress HTML output into a single line

Install
-------

[](#install)

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

try

```
composer require "ogheo/yii2-htmlcompress:*"

```

or add

```
"ogheo/yii2-htmlcompress": "*"

```

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

Configure
---------

[](#configure)

```
return [
    // ...
    'components' => [
        // ...
        'view' => [
            'class' => '\ogheo\htmlcompress\View',
            'compress' => YII_ENV_DEV ? false : true,
            // ...
        ]
    ]
];

```

By default extension is disabled on DEV environment and enabled on PROD.

Enjoy ;)

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity44

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 71.4% 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.

###  Release Activity

Cadence

Every ~101 days

Recently: every ~125 days

Total

7

Last Release

3260d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8630290c098996f9def06ef7ddabe2c05555f9ef805f936a5d8f560689b38dc1?d=identicon)[ogheo](/maintainers/ogheo)

---

Top Contributors

[![ogheo](https://avatars.githubusercontent.com/u/6599359?v=4)](https://github.com/ogheo "ogheo (10 commits)")[![Smilemd](https://avatars.githubusercontent.com/u/104572040?v=4)](https://github.com/Smilemd "Smilemd (2 commits)")[![qwestern](https://avatars.githubusercontent.com/u/8706363?v=4)](https://github.com/qwestern "qwestern (1 commits)")[![rlockerl](https://avatars.githubusercontent.com/u/5070566?v=4)](https://github.com/rlockerl "rlockerl (1 commits)")

---

Tags

yii2yii2-extensionyii2-htmlcompressyii2-htmlminifyyii2-htmlminimizehtmlminifycompressviewyii2outputminimize

### Embed Badge

![Health badge](/badges/ogheo-yii2-htmlcompress/health.svg)

```
[![Health](https://phpackages.com/badges/ogheo-yii2-htmlcompress/health.svg)](https://phpackages.com/packages/ogheo-yii2-htmlcompress)
```

###  Alternatives

[rmrevin/yii2-minify-view

Yii2 View component with auto minification css &amp; js in runtime

194302.3k7](/packages/rmrevin-yii2-minify-view)[fitztrev/laravel-html-minify

Minifies the HTML output of Laravel 4 applications

414211.4k](/packages/fitztrev-laravel-html-minify)[nochso/html-compress-twig

Twig extension for compressing HTML and inline CSS/Javascript

84468.6k8](/packages/nochso-html-compress-twig)[voku/html-compress-twig

Twig extension for compressing HTML

252.3M](/packages/voku-html-compress-twig)[yocmen/html-minify

Minifies the HTML output of Laravel 5 applications (Originally from https://github.com/fitztrev/laravel-html-minify)

1713.7k](/packages/yocmen-html-minify)[raoul2000/yii2-workflow-view

A simple widget to display your workflows

1638.8k20](/packages/raoul2000-yii2-workflow-view)

PHPackages © 2026

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