From afbcadf33cebe8678322c1a8d0c4be4e794d4cb3 Mon Sep 17 00:00:00 2001 From: Steve Clay Date: Mon, 7 Mar 2016 16:45:01 -0500 Subject: [PATCH] Begin prep for 2.3 release --- .gitignore | 2 ++ HISTORY.txt | 34 ++++++++++++++++++++++------------ docs/CookBook.wiki.md | 7 +++---- docs/CustomSource.wiki.md | 2 +- min/lib/DooDigestAuth.php | 2 ++ min/lib/FirePHP.php | 2 ++ min/lib/JSMinPlus.php | 6 +++++- min/lib/Minify/Loader.php | 5 +++++ min/lib/Minify/Logger.php | 2 +- 9 files changed, 43 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 3d403b4..42733c5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,7 @@ # / /test /.idea/ +/composer.lock .DS_Store /vendor +/.php_cs.cache diff --git a/HISTORY.txt b/HISTORY.txt index 464251c..39b46e4 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -1,10 +1,20 @@ Minify Release History -(master) - * Builder styled with Bootstrap (thanks to help from acidvertigo) - * Add config option for simply concatenating files +Version 2.3.0 + * Adds `$min_concatOnly` option to just concatenate files + * Deprecates use of Minify_Loader + * Deprecates use of Minify_Logger + * Deprecates use of JSMinPlus + * Deprecates use of FirePHP + * Deprecates use of DooDigestAuth -Version 2.2.0 +Version 2.2.1 (2014-10-30) + * Builder styled with Bootstrap (thanks to help from acidvertigo) + * Update CSSmin to v.2.4.8 + * Added WinCache + * URLs with spaces properly rewritten + +Version 2.2.0 (2014-03-12) * Fix handling of RegEx in certain situations in JSMin * Thanks to Vovan-VE for reporting this * Update composer.json with support info @@ -26,11 +36,11 @@ Version 2.2.0 * Allow far-future expiration and file versioning with the "v" querystirng parameter in addition to existing method * Lots of general code tidy ups -Version 2.1.7 +Version 2.1.7 (2013-07-23) * Fixes arbitrary file inclusion vulnerability on some systems * Thanks to Matt Mecham for reporting this -Version 2.1.6 +Version 2.1.6 (2013-07-19) * JSMin fixes * Prevents some Closure Compiler API failures * Uses autoloading for all class loading @@ -42,7 +52,7 @@ Version 2.1.6 * CLI script more portable * Adds composer.json -Version 2.1.5 +Version 2.1.5 (2012-03-10) * Removed XSS vulnerability * Disabled builder bby default * command line tools to minify and rewrite URIs in CSS @@ -51,7 +61,7 @@ Version 2.1.5 * Closure Compiler uses cURL when allow_url_fopen is off * Missing file notices when using groups -Version 2.1.4 +Version 2.1.4 (2010-07-10) * Option to minify JS with Closure Compiler API w/ JSMin failover * Cookie/bookmarklet-based debug mode. No HTML editing! * Allows 1 file to be missing w/o complete failure @@ -67,7 +77,7 @@ Version 2.1.4 * Removed annoying maxFiles limit * mbstring.func_overload usage is safer -Version 2.1.3 +Version 2.1.3 (2009-06-30) * HTTP fixes * ETag generation now valid (different when gzipped) * Vary header always sent when Accept-Encoding is sniffed @@ -79,7 +89,7 @@ Version 2.1.3 * Allow setting contentType in Minify_Source objects * No more 5.3 deprecation warnings: split() removed -Version 2.1.2 +Version 2.1.2 (2009-03-04) * Javascript fixes * Debug mode no longer confused by "*/*" in strings/RegExps (jQuery) * quote characters inside RegExp literals no longer cause exception @@ -91,14 +101,14 @@ Version 2.1.2 * Builder app doesn't fail on systems without gzdeflate() * APC caching class included -Version 2.1.1 +Version 2.1.1 (2008-10-19) * Bug fix release * Detection and workarounds for zlib.output_compression and non-PHP encoding modules * Zlib not required (mod_rewrite, et.al., can still be used for encoding) * HTML : More IE conditional comments preserved * Minify_groupUri() utility fixed -Version 2.1.0 +Version 2.1.0 (2008-09-18) * "min" default application for quick deployment * Minify URI Builder app & bookmarklet for quickly creating minify URIs * Relative URIs in CSS file are fixed automatically by default diff --git a/docs/CookBook.wiki.md b/docs/CookBook.wiki.md index a68de4d..975ddfc 100644 --- a/docs/CookBook.wiki.md +++ b/docs/CookBook.wiki.md @@ -91,13 +91,12 @@ $min_serveOptions['minifiers']['text/css'] = array('Minify_CSSmin', 'minify'); ## JSMin+ -Minify 2.1.3 comes with Tino Zijdel's [JSMin+](http://crisp.tweakblogs.net/blog/1665/a-new-javascript-minifier-jsmin+.html) 1.1. This is a full parser based on a port of [Narcissus](http://en.wikipedia.org/wiki/Narcissus_(JavaScript_engine)). To try it out: +Tino Zijdel's [JSMin+](http://crisp.tweakblogs.net/blog/6861/jsmin%2B-version-14.html) has resulted in memory usage problems for many users and will be removed from the Minify codebase in 3.0. If you wish to use it, you should download it outside the Minify directory and link to it: + ``` +require '/path/to/jsminplus.php'; $min_serveOptions['minifiers']['application/x-javascript'] = array('JSMinPlus', 'minify'); ``` -This should yield smaller javascript files, but I've tested this only briefly. For production you may want to get the [latest version](http://crisp.tweakblogs.net/blog/cat/716) (you must rename it: `min/lib/JSMinPlus.php`). - -Note: JSMin+ is memory intensive, so be prepared to up your memory limit. Also it has no [comment preservation](http://code.google.com/p/minify/source/browse/tags/release_2.1.3/min/lib/JSMin.php#10) as of 1.3, in case you rely on this. ## Server-specific Options diff --git a/docs/CustomSource.wiki.md b/docs/CustomSource.wiki.md index 1d615cb..c593c32 100644 --- a/docs/CustomSource.wiki.md +++ b/docs/CustomSource.wiki.md @@ -33,7 +33,7 @@ To change minifier, set `minifier` to a [callback](http://php.net/manual/en/lang ``` if (! function_exists('myMin')) { function myMin($js) { - require_once 'JSMinPlus.php'; + require_once '/path/to/jsminplus.php'; return JSMinPlus::minify($js); } } diff --git a/min/lib/DooDigestAuth.php b/min/lib/DooDigestAuth.php index 69bc4ed..5a9b467 100644 --- a/min/lib/DooDigestAuth.php +++ b/min/lib/DooDigestAuth.php @@ -23,6 +23,8 @@ * @version $Id: DooDigestAuth.php 1000 2009-07-7 18:27:22 * @package doo.auth * @since 1.0 + * + * @deprecated 2.3 This will be removed in Minify 3.0 */ class DooDigestAuth{ diff --git a/min/lib/FirePHP.php b/min/lib/FirePHP.php index 8fff783..bf4fb70 100644 --- a/min/lib/FirePHP.php +++ b/min/lib/FirePHP.php @@ -64,6 +64,8 @@ if (!defined('E_USER_DEPRECATED')) { * @author Christoph Dorn * @license [MIT License](http://www.opensource.org/licenses/mit-license.php) * @package FirePHPCore + * + * @deprecated 2.3 This will be removed in Minify 3.0 */ class FirePHP { diff --git a/min/lib/JSMinPlus.php b/min/lib/JSMinPlus.php index 5a3c5bd..1c7463c 100644 --- a/min/lib/JSMinPlus.php +++ b/min/lib/JSMinPlus.php @@ -170,7 +170,9 @@ define('KEYWORD_VOID', 'void'); define('KEYWORD_WHILE', 'while'); define('KEYWORD_WITH', 'with'); - +/** + * @deprecated 2.3 This will be removed in Minify 3.0 + */ class JSMinPlus { private $parser; @@ -197,6 +199,8 @@ class JSMinPlus public static function minify($js, $filename='') { + trigger_error(__CLASS__ . ' is deprecated. This will be removed in Minify 3.0', E_USER_DEPRECATED); + static $instance; // this is a singleton diff --git a/min/lib/Minify/Loader.php b/min/lib/Minify/Loader.php index 0a225c0..ca43192 100644 --- a/min/lib/Minify/Loader.php +++ b/min/lib/Minify/Loader.php @@ -9,6 +9,8 @@ * * @package Minify * @author Stephen Clay + * + * @deprecated 2.3 This will be removed in Minify 3.0 */ class Minify_Loader { public function loadClass($class) @@ -20,6 +22,9 @@ class Minify_Loader { } } + /** + * @deprecated 2.3 This will be removed in Minify 3.0 + */ static public function register() { $inst = new self(); diff --git a/min/lib/Minify/Logger.php b/min/lib/Minify/Logger.php index 8eb72f4..5217441 100644 --- a/min/lib/Minify/Logger.php +++ b/min/lib/Minify/Logger.php @@ -10,7 +10,7 @@ * @package Minify * @author Stephen Clay * - * @todo lose this singleton! pass log object in Minify::serve and distribute to others + * @deprecated 2.3 This will be removed in Minify 3.0 */ class Minify_Logger {