manticoresearch-php icon indicating copy to clipboard operation
manticoresearch-php copied to clipboard

unix socket, php8 match keyword

Open mitsh opened this issue 4 years ago • 9 comments

UnixSocket support added. Class "Match" renamed to "QueryMatch" because of PHP8 'match' reserved keyword.

mitsh avatar Dec 25 '20 05:12 mitsh

Hi, as I said here Match is planned to be renamed to MatchQuery, not QueryMatch.. Also please validate the code against phpcs --standard=PSR2. Thanks

adriannuta avatar Dec 28 '20 11:12 adriannuta

Hi, okay I will do that and let you know.

mitsh avatar Dec 28 '20 13:12 mitsh

Hi @adriannuta, I used Swoole as a client in this transport. Is it good for the project?

mitsh avatar Jan 04 '21 07:01 mitsh

@mitsh any advantage in this context to use the Swoole Client vs something more native like stream? One would have to install the Swoole extension.

adriannuta avatar Jan 04 '21 12:01 adriannuta

@adriannuta yeah I got it. I will change the Swoole Client to a native one like fsockopen.

mitsh avatar Jan 04 '21 12:01 mitsh

fsockopen (or stream_socket_client) sounds better. Also have you tried with curl using CURLOPT_UNIX_SOCKET_PATH ? Haven't tested, but curl should be able to open sockets since php 7.0 (not sure which would be better, curl vs fsockopen/stream_socket_client)

adriannuta avatar Jan 04 '21 12:01 adriannuta

yes, I think so it is better(fsockopen). I've also tried as you mentioned with curl but it is not a stable option. php-curl extension should compile with the latest curl library.

mitsh avatar Jan 04 '21 12:01 mitsh

Please note that I committed today changes for compatibility with PHP 8.0, including the rename of the Match class.

adriannuta avatar Jan 05 '21 11:01 adriannuta

The unixsocket support task is still not finished as discussed above.

Nick-S-2018 avatar Aug 02 '22 09:08 Nick-S-2018

after a very long time. hello guys, if you haven't added unixsocket support yet. i can do the fixes and rerequest PR for it.

mitsh avatar Oct 30 '22 15:10 mitsh

i can do the fixes and rerequest PR for it.

Please do

sanikolaev avatar Oct 30 '22 19:10 sanikolaev