Skip to content

Add option to disable minification entirely#17

Open
wazum wants to merge 1 commit into
pluswerk:masterfrom
wazum:feature/disable-minification
Open

Add option to disable minification entirely#17
wazum wants to merge 1 commit into
pluswerk:masterfrom
wazum:feature/disable-minification

Conversation

@wazum

@wazum wazum commented Jun 22, 2026

Copy link
Copy Markdown

Closes #16

Adds a master disabled switch to turn minification off completely.

What

  • New disabled boolean in ext_conf_template.txt (default 0, so existing installs are unaffected).
  • MinifyService::minify() returns the HTML untouched when disabled is set, short-circuiting before any transformation. This covers both entry points (the middleware and the SSI RenderedEventListener), since both funnel through this method.
  • README documents toggling it per environment via config/system/additional.php, e.g. off on Development while active on Testing/Staging/Production.

Tests

  • Added a unit test asserting that with disabled = 1 (and transforming features on) the output equals the input byte-for-byte.
  • Full suite green (9 tests), phpcs/phpstan/rector clean via GrumPHP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a way to disable minification (e.g. in Development)

1 participant