ppshobi / psonic

Sonic is a super fast auto suggestion engine built by the team at crisp.chat, a customer engagement platform. its built in Rust and they officially support a javascript client, but if you want to use sonic via php, this is the library that you can look for. Completely unit tested, and adheres to modern coding standards, and offers a clean api to interact with sonic.
MIT License
130 stars 9 forks source link

Migrate to PHP v7.4 #13

Closed ghost closed 4 years ago

ghost commented 4 years ago

I moved to new version of PHP (v.7.4) and the library is failing with the changes of the new api. In particular in line psonic/src/Commands/Command.php#20. This is due to the recent change in the implode() method, so now the arguments are backwards.

The only change to apply in this case is the code return $this->command . " " . implode($this->parameters, " ") . "\n"; move it to return $this->command . " " . implode(" ", $this->parameters) . "\n";

That should solve the issue while the library is being adapted to new version. Could you post a new release with this fix?

ppshobi commented 4 years ago

Thanks for the comment. I've made the changes and added php7.4 to the Travis file to test against. v1.2.0 will hopefully help you. Thanks