Skip to content

feat(minifyx): replace Munee with pure-PHP pipeline for 2.0 - #1

Closed
Ibochkarev wants to merge 37 commits into
silverqx:masterfrom
modx-pro:feat/minifyx-2.0-pure-php-pipeline
Closed

feat(minifyx): replace Munee with pure-PHP pipeline for 2.0#1
Ibochkarev wants to merge 37 commits into
silverqx:masterfrom
modx-pro:feat/minifyx-2.0-pure-php-pipeline

Conversation

@Ibochkarev

Copy link
Copy Markdown

Replace the abandoned Munee dependency with a pure-PHP asset pipeline for MinifyX 2.0. The snippet, plugin, minify(), groups, hooks, and connector URL stay compatible with 1.x, but compilation, caching, and image handling now run on maintained PHP libraries without Node on production.

Munee and its git submodule are removed. CSS/JS minification uses matthiasmullie/minify; SCSS/LESS use scssphp and wikimedia/less.php; images use Intervention Image v3. The facade delegates to a PSR-4 AssetPipeline with atomic filesystem cache, fingerprinting, and shared processFiles() for snippet and plugin paths. PHP floor is 8.2; MODX 2.8 and 3.x are supported through a legacy adapter.

Security hardening closes path traversal (directory-boundary checks), cache filename injection, unbounded resize DoS (4096px cap), and no-op HMAC when a signing key is set. Failed compiles no longer write empty bundles. Post-hooks sync content before cache write; SCSS/LESS receive query-string variables; bundled registered assets keep first-tag attributes and drop SRI/crossorigin.

PHPUnit (24 tests) and PHPStan level 8 are included with GitHub Actions CI. See core/components/minifyx/docs/migration-2.0.md for upgrade notes.

bezumkin and others added 30 commits December 3, 2013 17:44
Version 1.2.2-pl1
$dir = str_replace('//', '/', '/' . $this->config['munee_cache'] .'/' ); 
this version do not work on windows, so but 
$dir = str_replace('//', '/', $this->config['munee_cache']); 
works both on win and linux
Добавил явный return. Без него в MODX 2.3.0 сниппеты возвращают символ '1' в поток вывода, из-за чего в данном случае "ползёт" вёрстка.
- Fixed fatal error on PHP 5.3.3.
Version 1.4.1-p2
sergant210 and others added 7 commits December 31, 2018 07:16
Если указать в параметре registerJs значение startup, то ничего не произойдет, так как в свиче нет такого кейса.
Update minifyx.class.php
Drop the abandoned Munee stack in favor of a PSR-4 PHP 8.2 pipeline that
keeps the MODX 2.8/3.x public API while adding hardened caching, image
handling, CI, and regression tests.
Document MODX 2.8.x+ on PHP 7.4+ and MODX 3.x on PHP 8.2+, and enforce
the matching floor during package install/upgrade.
@Ibochkarev

Copy link
Copy Markdown
Author

Superseded by modx-pro#9

@Ibochkarev Ibochkarev closed this Jul 27, 2026
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.

6 participants