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
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
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
Matthias Zronek
2f33b69786
Bugfix for option sanitizer
2019-10-28 11:03:44 +01: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
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
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 and MAMP
2017-08-09 17:22:32 -04:00
Benoît Rouleau
449f009b39
Fix issue where minify() would corrupt Unicode characters (such as ) 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 ` ` 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
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
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
Elan Ruusamäe
035183b2b8
cacheIsStale is not public
2016-10-13 14:40:21 +03:00
Elan Ruusamäe
72dd4db37a
calculate lastmodified to be maximum accurate
...
the time() may be incorrect if there's slight delay between file modify and cache write. but as file modify is what is important, rely on that.
also needed to use different cache file because the format change.
2016-10-13 12:50:27 +03:00
Elan Ruusamäe
78d5921f91
lessphp: use updated timestamp from cache
...
no need to calculate the timestamp ourselves each time the calculated value already present in cache object
2016-10-13 12:40:48 +03:00
Elan Ruusamäe
3014900cd4
add base directory of input file to import path
...
this is needed for @import to be able to resolve included files
2016-10-13 12:20:50 +03:00
Elan Ruusamäe
fdc69a369e
add scss support via leafo/scssphp
2016-10-12 16:39:00 +03:00
Elan Ruusamäe
9ca1bc9e74
add checkAllowDirs to sourceFactoryOptions
...
needed to be able to specify the option via config
2016-10-12 16:34:39 +03:00
Steve Clay
59d4c97ffc
Minify now allows static file serving
...
With slightly altered URLs, Minify can cache files so they're served directly
from the filesystem instead of through PHP. A simple library helps create URLs
and clearing the cache.
See `static/README.md` for details.
2016-06-29 12:43:57 -04:00
Steve Clay
a0e781e278
Merge pull request #505 from glensc/jshrink
...
add jshrink thin wrapper
2016-06-28 14:58:24 -04:00