NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #2438 most downloaded on Packagist
HTML Compressor and Minifier
Last release 5 months ago
23 Apr 2026
Ships unpredictably
gaps range from 2 weeks to 2.0 years
Most releases are documented
notes for 44 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
63 releases · first in 2016
fix PHP 8.5 deprecation warnings: replace SplObjectStorage-based observer registration with an array-keyed map to avoid duplicates
doRemoveCommentsOnly() for removing regular HTML comments without applying other minification changesdoMinifyJavaScript() (uses tedivm/jshrink)doRemoveDataAttributes() option to drop all data-* attributes (disabled by default)doRemoveOmittedHtmlTags() to cover more WHATWG optional-tag rules (html, head, body, colgroup, tbody, rt, newer p followers, and hr handling for option / optgroup)doMakeSameDomainsLinksRelative() now accepts a plain true flag; use the new fluent setLocalDomains(array) helper to configure domains separatelySplObjectStorage-based observer registration with an array-keyed map to avoid duplicatesbody starts (meta, link, noscript, script, style, template)<script type="application/ld+json"> whitespace minification preserving valid JSON<b>, <em>, <i>, <strong>, <u>) not being preserved correctly<head> and <body> fragment closing-tag omissionid attribute handling triggering a type errortext/html script-template tags leaking internal simple_html_dom placeholdersxml:lang attribute being lost and trim script-tag whitespace for PHP 7.x compatibilitypatchSimpleHtmlDomPlaceholders() as an idempotent Reflection-based method for simple_html_dom v5 compatibilityvoku/simple_html_dom dependency to ^5.0; add tedivm/jshrink ^1.8.1; require PHP >=7.1One column per quarter.
[*]: update the changelog
[*]: update the changelog
[*]: update the changelog
[*]: update the changelog
[*]: update the changelog
[*]: update the changelog
[*]: update the changelog
[*]: update the changelog
[+]: remove content before "<!doctype.*>", otherwise DOMDocument cann…
[+]: remove content before "<!doctype.*>", otherwise DOMDocument cann…
[*]: update the changelog
[*]: update the changelog
[*]: update the changelog
[*]: update the changelog
[*]: update the changelog
[+]: ignore false-positiv errors from phpstan
[+]: ignore false-positiv errors from phpstan
fix "domNodeClosingTagOptional()" -> fix logic of detecting next sibling dom node
fix "domNodeClosingTagOptional()" -> do not remove " " if there is more content in the parent node
use a new version of "voku/simple_html_dom" (4.7.16)
add "doRemoveDeprecatedTypeFromStyleAndLinkTag()"
fix "remove deprecated script-mime-types"
add "doKeepHttpAndHttpsPrefixOnExternalAttributes(bool)": keep http:// and https:// prefix for external links | thanks @abuyoyo
add "doRemoveHttpsPrefixFromAttributes()": remove optional "https:"-prefix from attributes (depends on "doOptimizeAttributes(true)")
fix: too many single white spaces are removed
fix: fix regex for self-closing tags
fix: protect "nocompress"-tags before notifying the Observer
- fix: removing of dom elements
- fix: removing of "\ "-tags
use new version of "voku/simple_html_dom"
fix: remove unnecessary \ closing tag #40
use interfaces in the "HtmlMinDom"-Observer
-> this is a BC, but you can simply replace this classes in your observer implementation:
---> "SimpleHtmlDom" with "SimpleHtmlDomInterface
---> "HtmlMin" with "HtmlMinInterface"
fix / optimize: "doRemoveOmittedQuotes" -> support for "\ " via SimpleHtmlDom
- fix: "'" && '"' in attributes
fix: keep HTML closing tags in \ tags
fix: keep newlines in e.g. "pre"-tags
code-style: remove "true" && "false" if return type is bool
use new version of "voku/simple_html_dom"
Nothing published for this version
Nothing published for this version
add "HtmlMinDomObserverInterface" (+ HtmlMin as Observable)
- implement the "\ "-tag + tests
update vendor (voku/simple_html_dom >= v4.1.7) + fix entities (<, >)
update vendor (voku/simple_html_dom >= v4.1.6) + option for keep broken html
update vendor (voku/simple_html_dom >= v4.1.4)
fix regex for self-closing tags
update vendor (voku/simple_html_dom >= v4.1.3)
-> this is a breaking change, without any API changes
-> this is a breaking change, without any API changes
check if there was already whitespace e.g. from the content
fix "Minifier removes spaces between tags"
try to fix "Minifier removes spaces between tags" v2
try to fix "Minifier removes spaces between tags" v1
doRemoveOmittedQuotes() -> remove quotes e.g. class="lall" => class=lall
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →