WyriHaximus / HtmlCompress

MIT License
77 stars 17 forks source link

Please re-introduce externalCompressors flag on Factory::constructSmallest() or tidy up dependencies downstream. #149

Closed Basster closed 2 years ago

Basster commented 2 years ago

In 520e7cec677bb44248a0de8033b217d93b37dc56 you've removed the $externalCompressors flag on Factory::constructSmallest().

Unfortunately both dependent factories CssCompress -> Factory and JsCompress -> Factory still have this flag (default: true) and both now load the YUI\Compressor which has a very questionable processing and exception handling:

Deep down in YUI\Compressor it performs a proc_open on the required yuicompressor.jar (which is present, because of composer requirement in nervo/yuicompressor) but fails on the corresponding fwrite throwing an exception but leaving the proc_open pointer open (no exception handling with proc_close) which may lead to a lot of unnecessary process handlers.

WyriHaximus commented 2 years ago

Doh, will tidy up the dependencies, this was never intended to happen. Sorry about that :(

WyriHaximus commented 2 years ago

Ok, I found where this went wrong. At which point I completely forgot to drop the YUI compressors in dependencies and as such messed up. Working on PR's for both now resolve that and fix that in here as well

WyriHaximus commented 2 years ago

Just released 4.1.3 that drops the YUI compressors as I intended to do last year already.

Basster commented 2 years ago

Thank you @WyriHaximus!