1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-30 09:09:54 +02:00

166 Commits

Author SHA1 Message Date
Thomas A. Hirsch
60f49fa1e3 explicitly mark parameters as nullable 2025-01-28 15:50:41 +01:00
Steve Clay
43fb768c13 Fixes #693 2024-01-04 01:29:02 -05:00
Steve Clay
9e182a6255 Use scssphp/scssphp 2024-01-04 01:00:44 -05:00
Steve Clay
bc1ffdc5fc Test fixes 2024-01-04 01:00:44 -05:00
Adrien Poupa
4a9d0595e3 feat: Allow invalidation from manual invocation 2022-12-14 15:21:52 -05:00
tamakianimalife
8c69866874 Add property declaration 2022-12-14 17:30:53 +09:00
Christoph Rönsch
455084b284 Minify_Cache_APCu replaces APC 2022-10-01 22:23:52 +02:00
Oleksandr Krasko
8b91de51c3 Fix null argument to preg_split
Deprecated Functionality: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated

https://www.php.net/manual/en/function.preg-split.php#refsect1-function.preg-split-parameters

limit:

If specified, then only substrings up to limit are returned with the
rest of the string being placed in the last substring. A limit of -1 or
0 means "no limit".

Refs:
- https://www.drupal.org/project/geshifilter/issues/3262325

Signed-off-by: Elan Ruusamäe <glen@pld-linux.org>
2022-05-14 14:01:14 +03:00
Elan Ruusamäe
b89bc57164 Fix Array and string offset access syntax with curly braces is deprecated 2020-10-24 18:52:22 +03:00
Elan Ruusamäe
b17c00c05c Make code symmetric: Check on ConditionalGet as well
This partly reverts 5705fc9d89
2020-07-12 10:34:01 +03:00
Elan Ruusamäe
b31855f6b8 Apply php-cs-fixer fixers
- braces
- function_declaration
- lowercase_keywords
- method_argument_space
- no_spaces_inside_parenthesis
- no_trailing_whitespace
- no_trailing_whitespace_in_comment
- single_blank_line_at_eof
2020-04-03 10:47:27 +03:00
Andrew Welch
0f607be23a Exclude SSI Comments (#670)
* Exclude SSI comments

Exclude Nginx & Apache Server Side Include (SSI) comments from being stripped via minification, the same way IE directives are not stripped.

Both Nginx & Apache SSI directives begin with:

<!—#

So we can just look for the # and don’t strip the comment in that case.

Nginx SSI: http://nginx.org/en/docs/http/ngx_http_ssi_module.html

Apache SSI: https://httpd.apache.org/docs/2.4/howto/ssi.html

* Add tests for Nginx/Apache SSI directives

Co-authored-by: Andrew Welch <andrew@keluli.local>
2020-04-02 22:45:11 +03:00
robbykrlos
5705fc9d89 Function get_magic_quotes_gpc() is now deprecated in PHP 7.4 #661
- removed deprecated function that since PHP 5.4.0 returns FALSE always, and since PHP 7.4 is deprecated.
2020-03-06 19:20:17 +02:00
Matthias Zronek
2f33b69786 Bugfix for option sanitizer 2019-10-28 11:03:44 +01:00
Elan Ruusamäe
807f41903e Merge pull request #642 from csabahete/master
Set "Vary: Accept-Encoding" header only if encoding is set and not empty
2019-09-19 10:30:56 +03:00
David Li
f50353a952 Check if each variable is in the symbol table.
Delete if not before passing into compact.
2019-02-27 14:39:56 -05:00
Csaba Hete
bd7d1077b3 set "Vary: Accept-Encoding" header only if encoding is set and not empty 2018-11-06 19:24:25 +01:00
Elan Ruusamäe
258e495451 Revert "simplify substr third param"
This reverts commit 5659799c42.

the change actually broken MinifyImportProcessorTest
2018-01-05 19:13:28 +02:00
Elan Ruusamäe
b97a1db01d cleanup unneeded import 2018-01-05 19:09:42 +02:00
Elan Ruusamäe
df7fddfa09 import classes instead of manual qualify 2018-01-05 14:35:57 +02:00
Elan Ruusamäe
c580d24e1b simplify return statement 2018-01-05 14:35:09 +02:00
Elan Ruusamäe
f9c96b6a3c use in_array instead of array_search (clearer intent) 2018-01-05 14:34:43 +02:00
Elan Ruusamäe
d3decb27e1 strict comparison 2018-01-05 14:34:06 +02:00
Elan Ruusamäe
0038cdb5de use empty string comparison instead of strlen 2018-01-05 14:34:06 +02:00
Elan Ruusamäe
5659799c42 simplify substr third param 2018-01-05 14:34:06 +02:00
Elan Ruusamäe
57be61586e use origin function instead of alias 2018-01-05 14:33:52 +02:00
Elan Ruusamäe
2198482600 drop useless return phpdoc annotation for constructor 2018-01-05 14:30:01 +02:00
Elan Ruusamäe
c2f40feb0c split workflows (no else after return) 2018-01-05 14:29:16 +02:00
Elan Ruusamäe
5c300aca97 do not define default value 2018-01-05 14:28:28 +02:00
Elan Ruusamäe
76c1edc6ff drop stale version comment 2018-01-05 14:27:22 +02:00
Emanuele "ToX" Toscano
d9b392c474 Fix closure-compiler's "redirection limit reached"
Since a few days, the js minification was complaining about a redirection limit in the closure-compiler call. This was generating an error each time I have tried to use this tool.

After a bit of investigation I have found out that it was missing some parameters that are now mandatory. Plus, it now works in https only.
2017-11-03 10:24:25 +01:00
Steve Clay
72ece76cdf Fixes syntax error in Groups controller
Fixes #613
2017-09-14 18:03:49 -04:00
Benoît Rouleau
6b274afd0b unicode flag everywhere to fix more issues with &nbsp; and MAMP 2017-08-09 17:22:32 -04:00
Benoît Rouleau
449f009b39 Fix issue where minify() would corrupt Unicode characters (such as &nbsp;) in some environments
Adding the `u` flag there fixes an issue in my environment (MAMP 4.1.1 with PHP 7.1.5) where `minify()` would corrupt the `&nbsp;` character (it would get replaced by the replacement character).
2017-07-20 20:34:49 -04:00
Elan Ruusamäe
80c01c6f02 php-cs-fixer fix 2017-04-18 18:24:17 +03:00
Elan Ruusamäe
b6e4b7f152 update cssmin import. resolves #590
refs a1489b2
2017-04-18 18:23:03 +03:00
Steve Clay
e904f2e1ae ImportProcessor can handle URIs with query strings
Fixes #479
2017-04-03 16:50:53 -04:00
Steve Clay
62370404c8 Make sure $min_documentRoot is copied into Env.
Fixes #585
2017-04-03 16:36:33 -04:00
Steve Clay
532a010e0e Parse LastModified date without requiring global timezone 2017-04-03 16:01:21 -04:00
Steve Clay
5f15af469d Merge branch 'master' into static 2017-01-18 21:09:38 -05:00
Steve Clay
12b9096b23 URI rewriter passes through empty URLs
Fixes #561
2017-01-18 18:48:24 -05:00
Elan Ruusamäe
6a330d9091 pass any option to closure compiler 2016-12-06 16:59:36 +02:00
Elan Ruusamäe
b8c79ac8d4 Minify: add details to ContentType mismatch errors 2016-11-02 15:53:15 +02:00
Elan Ruusamäe
b31ddbf4c1 add missing .scss to css type map. #549 2016-10-17 15:14:56 +03:00
Elan Ruusamäe
74042c87ad allow .scss via f= param. #549 2016-10-17 14:22:30 +03:00
Steve Clay
16c811cd93 Big style cleanup 2016-10-16 15:13:38 -04:00
Elan Ruusamäe
5fb7ea1ed1 phpcs: enable psr2 2016-10-16 18:51:49 +03:00
Elan Ruusamäe
0cc631c5a9 php-cs fixes
1) Minify.php (return)
   2) Minify/Env.php (return)
   3) Minify/JS/JShrink.php (return)
   4) Minify/HTML/Helper.php (return)
   5) Minify/Logger/LegacyHandler.php (unused_use)
   6) Minify/Lines.php (return)
   7) Minify/Controller/Files.php (unused_use)
   8) Minify/ControllerInterface.php (unused_use)
   9) Minify/Cache/File.php (return)
2016-10-16 16:44:58 +03:00
Elan Ruusamäe
2809e3c2eb Merge pull request #550 from glensc/lessphp-cache
lessphp: use updated timestamp from cache
2016-10-16 13:51:17 +03:00
Elan Ruusamäe
a9891a031c Merge pull request #549 from mrclay/scssphp
add scss support via leafo/scssphp
2016-10-16 13:50:58 +03:00