tedious / JShrink

Javascript Minifier built in PHP
http://www.tedivm.com
BSD 3-Clause "New" or "Revised" License
751 stars 152 forks source link

New release for PHP 8 #100

Closed WyriHaximus closed 3 years ago

WyriHaximus commented 3 years ago

Since https://github.com/tedious/JShrink/pull/97 got merged, and https://github.com/tedious/JShrink/commit/ca8970bd84e78eabaf0daa30eb591161b4d71859 fix code wise incompatibility with PHP 8. Is there a new release coming soon?

iquito commented 3 years ago

Would welcome this too! When using JShrink in PHP8 I get maximum execution time exceeded (it takes very long in the Minifier class and exceeds my 60 seconds limit), probably because the changes from https://github.com/tedious/JShrink/commit/ca8970bd84e78eabaf0daa30eb591161b4d71859 have not been released yet.

syteknet-core commented 3 years ago

i also support that!

@tedivm anything else needs to be done for a the new release we can help with?

jimblue commented 3 years ago

Hey @tedivm, just a friendly ping. Could you please create a new release to fixe that issue ? Thank you so much 😊

sgiehl commented 3 years ago

@iquito Just as a side note why the last released version actually doesn't work on PHP 8: Reason is an internal change in PHP where the return value of substr changed. e.g. substr('test', 5, 1) returns false on PHP 7, while it returns an empty string on PHP 8. JShrink internally walks through all characters of a file until the last character is reached - indicated by the return value false. As PHP 8 never returns that false the loop is never ended.

ca8970b actually fixed that as substr is no longer used.

kohlerdominik commented 3 years ago

@tedivm Ping after christmas 😊

ConnectGrid commented 3 years ago

Patiently waiting for this fix, as well.

tedivm commented 3 years ago

v1.4.0 is now up on packagist.