Elan Ruusamäe
eff278193b
Apply php-cs-fixer new rules
2019-12-11 17:06:18 +02: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
Steve Clay
02c859b01b
Merge pull request #532 from mrclay/urls_in_lines
...
Improve Minify_Lines algorithm and add tests
2016-06-28 14:52:14 -04:00
Steve Clay
31518971be
Merge pull request #501 from glensc/minify-env
...
do not require SERVER_SOFTWARE being present in $server
2016-06-08 10:14:02 -04:00
Steve Clay
2045731d60
Improve Minify_Lines algorithm and add tests
...
Fixes #531
Fixes #534
2016-05-19 15:14:27 -04:00
Steve Clay
de39966e9c
Makes sure all file/dir paths are normalized to prepare for comparing.
...
Particularly the system docRoot and currentDir values passed to the URI
rewriter and the allowDirs check.
2016-05-12 13:29:54 -04:00
Steve Clay
865946c0ed
Merge branch '2.x' into merge2x
...
Conflicts:
.gitignore
HISTORY.txt
README.md
config.php
docs/CookBook.wiki.md
docs/CustomSource.wiki.md
lib/Minify/CSS/UriRewriter.php
min/lib/DooDigestAuth.php
min/lib/FirePHP.php
min/lib/JSMinPlus.php
min/lib/Minify/Controller/Base.php
min/lib/Minify/Loader.php
min/lib/Minify/Logger.php
2016-05-12 11:03:16 -04:00
Steve Clay
b7cf3808d7
Improves README and add install doc page
...
Shows how to install as a composer dependency
2016-04-02 11:46:29 -04:00
Steve Clay
24b601217e
Merge pull request #512 from mrclay/deps
...
Large restructuring
2016-03-10 18:48:49 -05:00
Steve Clay
4710509c68
Large restructuring
...
Moves all dependency building into App
bootstrap.php returns an App instance
The app loads config files as necessary
Moves logging to Monolog
Moves HTTP digest auth to packagist component
Rely on sys_get_temp_dir
Env hosts $_POST and allows defaults when reading
HTML helper uses the App and can handle less files
Source factory assumes strings are filenames
Fixes JsClosureCompilerTest::test6 (API now handles ES5 by default)
Exclude JsClosureCompilerTest due to API limitations
config.php can now return a Minify\Config object
Variables set in config.php are now moved to a `Minify\Config` object,
allowing better static analysis.
The `zlib.output_compression` set is moved into `Minify::serve`.
2016-03-10 18:44:23 -05:00
Steve Clay
7dbd2c87e4
Minify no longer tries to minify -min.js/.min.js files
...
2.2 used empty string as a magical value meaning do not minify, but
in the refactoring `Minify::combineMinify` forgot to interpret this
value that way and instead inherited the default compressor for the type.
This eliminates `""` as a magical value, but for BC rewrites it to
`Minify::nullMinifier` in the sources.
Fixes #499
2016-02-26 11:17:55 -05:00