loilo / Fuse

🔍 Fuzzy search for PHP, ported from Fuse.js
Apache License 2.0
326 stars 30 forks source link

you require >= php 5.4 in your composer.json but you use the coalesce operator in src/Bitap/search.php #3

Closed fbiesse closed 6 years ago

fbiesse commented 6 years ago

Good job, but I would like to use this library in php 5.6 but it is impossible because of the use of the coalesce operator that appears in php 7. Do you think it is possible to make it compatible like you describe it in your composer.json ?

Thank you.

loilo commented 6 years ago

Aw, I mentioned it in the readme but apparently forgot to update the composer.json.

Let's see what we can do.

fbiesse commented 6 years ago

Thank you, at the moment, I moved to version 2.6.2.

loilo commented 6 years ago

Okay, I took a look.

First, I have to correct you: The composer.json correctly states that PHP 7 is required. The only version where this is broken is the first release of version 3, namely 3.0.5, which was a bug and was immediately fixed in 3.0.6.

Second, it took a while, but I made the tests pass in PHP 5.6 (wasn't easy, the changed sorting behaviour was trolling me a bit).

Long story short: Version 3.2.1 is released with re-introduced support for PHP 5.6. Have fun with it. 🙂

fbiesse commented 6 years ago

Thank you ! :)

loilo commented 6 years ago

My pleasure. Would love to hear if everthing works as expected.