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.
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?
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 theimplode()
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 toreturn $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?