PHPackages                             christianklisch/slim-minify - 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. christianklisch/slim-minify

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

christianklisch/slim-minify
===========================

Minify html output in slim framework

0.7.0(4y ago)3831.9k↓50%9[3 issues](https://github.com/christianklisch/slim-minify/issues)1MITPHPPHP &gt;=7.2.0

Since Mar 21Pushed 4y ago2 watchersCompare

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

READMEChangelog (10)Dependencies (1)Versions (12)Used By (1)

slim-minify
===========

[](#slim-minify)

Slim middleware to minify HTML output generated by the slim PHP framework. It removes whitespaces, empty lines, tabs beetween html-tags and comments to reduce traffic. This script is a summary of stackoverflow answers.

Requirements
------------

[](#requirements)

- PHP Version &gt;= 7.2
- Slim Version &gt;= 4.0

Usage
-----

[](#usage)

Copy the file Minify.php to 'Slim/Middleware/'. Register minify via $app-&gt;add():

or use the composer:

```
    "require": {
        "christianklisch/slim-minify": "0.7.0"
    }

```

in 'src/middleware.php':

```
$app->add(new \Slim\Middleware\Minify() );
```

to deactivate minified output:

```
$app->add(new \Slim\Middleware\Minify(false);
```

Contributors
------------

[](#contributors)

- Christian Klisch

Copyright and license
---------------------

[](#copyright-and-license)

Copyright 2014 released under [MIT](LICENSE) license.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 65.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 ~227 days

Recently: every ~517 days

Total

11

Last Release

1800d ago

PHP version history (3 changes)0.2PHP &gt;=5.0.0

0.5.0PHP &gt;=5.6.0

0.7.0PHP &gt;=7.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/6c734fd678c062b95a1e2c3b87711d6ffe18618da157e136d798617f3d012bfb?d=identicon)[christianklisch](/maintainers/christianklisch)

---

Top Contributors

[![christianklisch](https://avatars.githubusercontent.com/u/3337529?v=4)](https://github.com/christianklisch "christianklisch (17 commits)")[![molayli](https://avatars.githubusercontent.com/u/8279601?v=4)](https://github.com/molayli "molayli (3 commits)")[![aliusa](https://avatars.githubusercontent.com/u/9768908?v=4)](https://github.com/aliusa "aliusa (2 commits)")[![sankalpsans](https://avatars.githubusercontent.com/u/713909?v=4)](https://github.com/sankalpsans "sankalpsans (1 commits)")[![jissereitsma](https://avatars.githubusercontent.com/u/7670482?v=4)](https://github.com/jissereitsma "jissereitsma (1 commits)")[![bbarreto](https://avatars.githubusercontent.com/u/8928?v=4)](https://github.com/bbarreto "bbarreto (1 commits)")[![mochalygin](https://avatars.githubusercontent.com/u/2054744?v=4)](https://github.com/mochalygin "mochalygin (1 commits)")

---

Tags

phphtmlminify

### Embed Badge

![Health badge](/badges/christianklisch-slim-minify/health.svg)

```
[![Health](https://phpackages.com/badges/christianklisch-slim-minify/health.svg)](https://phpackages.com/packages/christianklisch-slim-minify)
```

###  Alternatives

[frosh/platform-html-minify

This plugin delivers minified HTML and minified inline JavaScript to visitors.

1170.7k](/packages/frosh-platform-html-minify)[artem_c/emmet

emmet implementation for php

141.8k](/packages/artem-c-emmet)

PHPackages © 2026

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