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

9 Commits
3.0.6 ... 2.x

Author SHA1 Message Date
Elan Ruusamäe
1928e89208 Fix closure-compiler's error "redirection limit reached". fixes #618, #619
Merge branch 'v2.x-pr-618' into 2.x
2017-11-03 23:04:01 +02:00
Emanuele "ToX" Toscano
e4ba869444 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 23:02:03 +02:00
Elan Ruusamäe
2c83b82bfa update changelog 2017-06-08 20:49:34 +03:00
Elan Ruusamäe
32150b84b6 Merge pull request #600 from Quetzacoalt91/2.x
Cast value as int for PHP 7.1
2017-06-08 20:42:07 +03:00
Thomas N
48a34d6900 Cast value to normalize as int for PHP 7.1 2017-05-31 16:20:51 +01:00
Steve Clay
a36e201ab2 Simplify docs for CSSmin on Minify 2.x 2017-04-25 11:30:12 -04:00
Steve Clay
fefc85d481 Revert "Parse LastModified date without requiring global timezone"
This reverts commit 176fb1084f.
2017-04-03 15:58:28 -04:00
Steve Clay
21cc3e7224 Merge pull request #570 from mrclay/default_tz
Parse LastModified date without requiring global timezone
2017-03-13 11:07:16 -04:00
Steve Clay
176fb1084f Parse LastModified date without requiring global timezone
Fixes #568
2017-02-07 15:33:31 -05:00
4 changed files with 27 additions and 29 deletions

View File

@@ -1,6 +1,19 @@
Minify Release History
Version 2.3.0
Version 2.3.3 (2017-11-03)
* Fix closure-compiler's error "redirection limit reached". #618, #619
Version 2.3.2 (2017-06-09)
* PHP 7.1 compatibility fix. #600
Version 2.3.1 (2017-04-03)
* No longer alters inline SVG id URLs. #517, #519
* Use $min_libPath in examples and move it within config.php. #522, #524
* Prevent false mod_rewrite error. #540
* Sync JSMin with mrclay/jsmin-php. #537
* URI rewriter passes through empty URLs. #561, #564
Version 2.3.0 (2016-03-11)
* Adds `$min_concatOnly` option to just concatenate files
* Deprecates use of Minify_Loader
* Deprecates use of Minify_Logger
@@ -116,7 +129,7 @@ Version 2.1.0 (2008-09-18)
* Better IIS support
* Improved minifier classes:
* JS: preserves IE conditional comments
* CSS: smaller output, preserves more hacks and valid CSS syntax,
* CSS: smaller output, preserves more hacks and valid CSS syntax,
shorter line lengths, other bug fixes
* HTML: smaller output, shorter line lengths, other bug fixes
* Default Cache-Control: max-age of 30 minutes
@@ -133,15 +146,15 @@ Version 2.0.1 (2008-05-31)
* E_STRICT compliance (Cache_Lite_File).
Version 2.0.0 (2008-05-22)
* Complete code overhaul. Minify is now a PEAR-style class and toolkit
* Complete code overhaul. Minify is now a PEAR-style class and toolkit
for building customized minifying file servers.
* Content-Encoding: deflate/gzip/compress, based on request headers
* Expanded CSS and HTML minifiers with test cases
* Easily plug-in 3rd-party minifiers (like Packer)
* Plug-able front end controller allows changing the way files are chosen
* Compression & encoding modules lazy-loaded as needed (304 responses use
* Compression & encoding modules lazy-loaded as needed (304 responses use
use minimal code)
* Separate utility classes for HTTP encoding and cache control
* Separate utility classes for HTTP encoding and cache control
Version 1.0.1 (2007-05-05)
* Fixed various problems resolving pathnames when hosted on an NFS mount.

View File

@@ -67,24 +67,6 @@ $min_serveOptions['minifiers']['text/css'] = 'yuiCss';
Minify has added Túbal Martín's [PHP port](https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port/blob/master/cssmin.php) of the YUI Compressor's CSSmin. While it is not completely integrated yet, you may try it out:
```
function yuiCssPort($css, $options) {
$compressor = new CSSmin();
$css = $compressor->run($css, 9999999);
$css = Minify_CSS_UriRewriter::rewrite(
$css,
$options['currentDir'],
isset($options['docRoot']) ? $options['docRoot'] : $_SERVER['DOCUMENT_ROOT'],
isset($options['symlinks']) ? $options['symlinks'] : array()
);
return $css;
}
$min_serveOptions['minifiers']['text/css'] = 'yuiCssPort';
```
As of commit [218f37](https://github.com/mrclay/minify/commit/218f37fb44f9be2ea138cf9efb8b7f6dc84bad7f), this is easier:
```
$min_serveOptions['minifiers']['text/css'] = array('Minify_CSSmin', 'minify');
```
@@ -154,4 +136,4 @@ function postProcess($content, $type) {
}
$min_serveOptions['postprocessor'] = 'postProcess';
```
This function is only called once immediately after minification and its output is stored in the cache.
This function is only called once immediately after minification and its output is stored in the cache.

View File

@@ -766,12 +766,12 @@ class CSSmin
{
if (is_string($size)) {
switch (substr($size, -1)) {
case 'M': case 'm': return $size * 1048576;
case 'K': case 'k': return $size * 1024;
case 'G': case 'g': return $size * 1073741824;
case 'M': case 'm': return (int) $size * 1048576;
case 'K': case 'k': return (int) $size * 1024;
case 'G': case 'g': return (int) $size * 1073741824;
}
}
return (int) $size;
}
}
}

View File

@@ -53,7 +53,7 @@ class Minify_JS_ClosureCompiler {
/**
* @var string $url URL of compiler server. defaults to Google's
*/
protected $serviceUrl = 'http://closure-compiler.appspot.com/compile';
protected $serviceUrl = 'https://closure-compiler.appspot.com/compile';
/**
* @var int $maxBytes The maximum JS size that can be sent to the compiler server in bytes
@@ -172,6 +172,9 @@ class Minify_JS_ClosureCompiler {
$contents = file_get_contents($this->serviceUrl, false, stream_context_create(array(
'http' => array(
'method' => 'POST',
'compilation_level' => 'SIMPLE',
'output_format' => 'text',
'output_info' => 'compiled_code',
'header' => "Content-type: application/x-www-form-urlencoded\r\nConnection: close\r\n",
'content' => $postBody,
'max_redirects' => 0,