feat(minifyx): replace Munee with pure-PHP pipeline for 2.0 - #1
Closed
Ibochkarev wants to merge 37 commits into
Closed
feat(minifyx): replace Munee with pure-PHP pipeline for 2.0#1Ibochkarev wants to merge 37 commits into
Ibochkarev wants to merge 37 commits into
Conversation
Version 1.2.2-pl1
Version 1.2.2-pl2
Version 1.2.2-pl3
Version 1.3.0-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' в поток вывода, из-за чего в данном случае "ползёт" вёрстка.
MODX 2.3.0 Compability fix
Update minifyx.class.php
Version 1.4.0-pl
Version 1.4.1-pl
- Fixed fatal error on PHP 5.3.3. Version 1.4.1-p2
Version 1.4.3-pl
Version 1.4.4-pl
Если указать в параметре 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.
Author
|
Superseded by modx-pro#9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
AssetPipelinewith atomic filesystem cache, fingerprinting, and sharedprocessFiles()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.mdfor upgrade notes.