akankov/laravel-compress-html
Laravel middleware that minifies HTML responses on the fly, removing whitespace, comments, and redundant markup to shrink page size and speed up delivery with zero template changes.
composer require, one config publish, and middleware registration. The decision should hinge on whether your team's maintenance time is better spent elsewhere, not on capability.composer audit CI job. That is a meaningful signal for a security/dependency review: the maintainer is instrumenting supply-chain hygiene rather than just shipping code. It moves this package from "unknown maintenance risk" toward "acceptable small-vendor dependency."InvalidArgumentException on a stale published config key, naming the offending snake_case key and the fix, directly reduces the cost of the exact failure mode that bites teams after a framework or package upgrade. That lowers the expected support burden of keeping this installed across Laravel majors.Adopt when all of the following hold:
Look elsewhere (or skip entirely) when:
<pre> content in your app. Validate against your highest-risk templates before rollout; whitespace-sensitive output is the classic failure mode for this class of middleware.For executives: This is a small, low-cost utility that trims rendered HTML before it leaves our servers — a marginal page-weight and latency improvement that complements, but does not replace, compression and CDN work. v2.1.1 is a maintenance release: no new features, no breaking changes, no migration work. The reason to note it is dependency risk: the maintainer added automated dependency updates, a security-audit CI job, and mutation testing, and improved error messages so upgrade failures are self-diagnosing. Net read: low adoption cost, low switching cost, improving maintenance hygiene — approve as a routine dependency rather than a strategic investment.
For engineering: Patch release, safe to take. Three things worth knowing: (1) a stale published config/htmlmin.php with a key the installed engine no longer accepts now throws an InvalidArgumentException naming the snake_case key, the file, and the fix, instead of the old Unknown named parameter $camelCasedKey boot failure — so pin the package version and prune config on upgrade; (2) the Blade directive test now renders through a real view file rather than Blade::render()'s component path, matching production and fixing a buffer imbalance under newer Laravel — the directive itself is unchanged; (3) mutation testing and composer audit/Dependabot gates were added but are non-blocking, so treat them as signals, not guarantees. No action required beyond a normal composer update and a smoke test of any whitespace-sensitive templates.
How can I help you explore Laravel packages today?