github afbora/kirby-minify-html 2.4.0

2 hours ago

Kirby 6 support

The plugin now works with Kirby 6 (tested with 6.0.0-beta.2). Kirby 3.9 to 5 keep working as before. No config changes are needed.

Fixes

  • Stacks in nested renders on Kirby 6 (bd0f09b): Kirby 6 fills stack placeholders (<!--kirby-stack:...-->) only when the outermost render is done (getkirby/kirby#7867). If a template rendered another page, for example with $page->render(), the minifier removed the placeholders as HTML comments and the pushed content was lost. The placeholders are now kept. Nothing changes on Kirby 5.
  • PHP 8.2 and 8.3 (1fcd965): 2.3.0 shipped a vendor folder that was built on PHP 8.4. It contained symfony/css-selector 8, so Composer's platform check stopped the plugin on PHP 8.2 and 8.3. The vendor folder is now built for PHP 8.2 and contains symfony/css-selector 7.4.
  • Text emails (55415a7): Text email templates (emails/*.text.php) were minified like HTML and lost their line breaks. Only HTML templates are minified now. This also happened on Kirby 5.

Changes

  • Requires PHP 8.2 or newer (was 8.0). Kirby 6 itself needs PHP 8.3.
  • composer.json has extra.kirby.compatible: ^3.9 || ^4.0 || ^5.0 || ^6.0. The lower bound is 3.9, because the plugin extends Kirby\Template\Template, which exists since Kirby 3.9. (30ae3ce)
  • Adds the kirby6 keyword and removes minimum-stability: dev from composer.json.

Tested with

  • Kirby 6.0.0-beta.2 on PHP 8.3, 8.4 and 8.5, and Kirby 5.6.1 on PHP 8.3 and 8.5.
  • Stacks (push, unique, return, glue, clear), also in nested renders, slots and layout snippets.
  • Representations by URL and by Accept header (getkirby/kirby#8277). They stay unminified as before.
  • The enabled, ignore and options settings, including doMakeSameDomainsLinksRelative.
  • HTML and text emails, the error page and the Panel, which isn't minified.

The HTML output on Kirby 6 is the same as on Kirby 5.

Full Changelog: 2.3.0...2.4.0

Don't miss a new kirby-minify-html release

NewReleases is sending notifications on new releases.