Elan Ruusamäe
eff278193b
Apply php-cs-fixer new rules
2019-12-11 17:06:18 +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
Elan Ruusamäe
80c01c6f02
php-cs-fixer fix
2017-04-18 18:24:17 +03:00
Elan Ruusamäe
b8c79ac8d4
Minify: add details to ContentType mismatch errors
2016-11-02 15:53:15 +02: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
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
0db2af8741
Minify::VERSION tracks only the major version
2016-05-12 10:45:58 -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
Elan Ruusamäe
379feaba99
do some trivial codestyle fixes
...
unix newlines, trailing spaces
2016-01-22 00:38:12 +02:00
Elan Ruusamäe
8e85853af8
be compatible with php-5.3
2015-11-17 16:46:23 +02:00
Steve Clay
53a832fd90
Be clearer about missing params
...
Fixes #423
2015-09-29 15:59:14 -04:00
Steve Clay
b7b26e3a83
A couple improvements
...
Show 400 if request is missing spec (instead of redirect)
Allow config.php to change factories for Minify and MinApp objects
These should've been separate commits, :(
2015-09-29 14:35:43 -04:00
Steve Clay
12e7a8d0dd
Allow sources to have null contentType if serve is given one
2015-09-29 13:18:10 -04:00
Steve Clay
a566536f80
Make Minify::combine and mix_extra stuff operational (and disabled by default)
2015-09-29 13:17:31 -04:00
Steve Clay
fede83cd48
Version constant bump, disable min_extras, docs updates
2015-09-29 10:12:47 -04:00
Steve Clay
0bc3769802
Make CSSmin the default CSS compressor
2015-09-28 20:32:56 -04:00
Steve Clay
e596b35fc4
Collapse "min" into project root and get unit tests working.
...
Fixes #472
2015-09-28 15:39:25 -04:00
Steve Clay
51adb91399
Moved "lib" into "min" for easiest deployment
2008-08-19 03:58:28 +00:00
Steve Clay
03e1989d35
Rewrite relative URIs in CSS by default (adjusted test accordingly)
...
Minify.php: + 'rewriteCssUris' option
Controller/Base.php: + 'rewriteCssUris' default value
Controller/Version1.php: moved rewriting to serve()
Minify/CSS.php: renamed option 'currentPath' to 'currentDir'
Minify/Source.php: made $filepath public
2008-08-18 23:38:39 +00:00
Steve Clay
2b8b1a5d25
Fix minify test case.
...
Minify: Make postProcessor option affect cacheId
2008-08-16 22:13:28 +00:00
Steve Clay
961e04ca30
Created "min" = new default implementation as specified in Issue 45.
...
Minify: fixed default value in useServerCache(), + doc for 'contentType' serve() option
Minify_Controller_Base: added todo item
Minify_Controller_Version1: fixed default cache to '' (instead of null)
2008-08-12 01:55:35 +00:00
Steve Clay
0697a120ee
+ Minify::$uploaderHoursBehind
...
+ fixed backtrace limit issue in Minify_HTML
+ default max-age of 30 minutes (instead of 0)
2008-07-29 03:48:10 +00:00
Steve Clay
2a41ee92c1
Resolved issue 37: replaced 'setExpires' with 'maxAge' option which allows both Expires headers and conditional GETs (if a page should be reloaded in IE, e.g.)
2008-07-22 23:39:12 +00:00
Steve Clay
6cdfb77083
Added Minify_Lines to test suite, full docs on added methods in Minify & Minify_Lines.
2008-06-30 19:46:23 +00:00
Steve Clay
e77a1cf82c
Added 'debug' option to serve() to use Minify_Lines
2008-06-28 20:23:29 +00:00
Steve Clay
4f615c12f3
Moved file caching to Minify_Cache_File.
...
Removed Cache_Lite.
Deprecated UseServerCache() in favor of setCache().
Added Groups controller to ab tests.
2008-06-22 15:08:30 +00:00
Steve Clay
d9c75da506
phpDoc now works. Started to improve docblocks.
2008-06-18 11:44:39 +00:00
Steve Clay
bf935a9895
Default charset now UTF-8. Easier ab tests config.
2008-06-09 23:29:38 +00:00
Steve Clay
4c85da1fb3
Added/improved ab tests. Prepended "minify_" to cache filenames.
2008-06-09 20:30:11 +00:00
Steve Clay
60f001c425
Rewrote Minify::serve() to use built-in cache functions and send cached output with readfile() = huge perf increase. Also only returns array iff quiet is set. Removed a few options.
...
Encoder.php : added option to leave out compress
Fixed unit tests for new Minify behavior and to show verbose when called directly on Windows.
2008-06-08 13:24:23 +00:00
Steve Clay
930ad768cf
+ E_STRICT compliance
2008-06-01 02:52:59 +00:00
Steve Clay
cd0675f490
+ Solar_Dir for better PHP compat. Moved most of minify.php code to Controller/Version1.php. + a few tests for version1/minify.php
2008-03-27 16:04:45 +00:00
Steve Clay
c15acc8782
+ test_HTTP_ConditionalGet.php, phpDoc improvements, moved packer to 3rd-party, test for Minify loading fewer files for 304 responses.
2008-03-05 22:59:23 +00:00
Steve Clay
e2ad73f8be
Improved/added tests, deflate preferred over gzip, improved ConditionalGet docs
2008-03-04 17:04:09 +00:00
Steve Clay
e8ac1dc8d0
Perf update for JSmin (Minify_Javascript), + phpDocs for public HTTP_* class APIs, minor Minify fix, private members changed to protected to allow easier subclassing.
2008-03-03 16:23:39 +00:00
Steve Clay
7a3d7129b4
+ HTTP_ConditionalGet_Build directory change monitor, + post-processing hook in Minify (for appending timestamps to URIs, etc.)
2008-03-02 04:59:13 +00:00
Steve Clay
d86d79b7d2
+ URI rewriter in CSS min, fix for protocol-relative URIs, + partial minify.php compatibility
2008-03-01 20:23:50 +00:00
Steve Clay
381bd8856d
Controllers now supply all options and are easier to write! serve() returns more useful info and needs only one option array for both controller/minify options.
2008-03-01 15:08:38 +00:00
Steve Clay
7e9bf6d948
More thorough test_Minify.php
...
Better var/method naming.
2008-03-01 04:56:11 +00:00
Steve Clay
f46e321831
added 'quiet' option. and now serve() and handleRequest() return an array of output content and headers.
2008-02-29 23:59:50 +00:00
Steve Clay
023066ad0a
option changed to "setExpires"
...
default missing minifier is none (no minification performed)
2008-02-29 22:18:16 +00:00
Steve Clay
99c5af660b
Docs update
2008-02-29 01:36:05 +00:00
Steve Clay
0a939d4f91
V1.9.0 overhaul
2008-02-28 18:42:56 +00:00