aerospike-community/aerospike-client-php

Support for PHP 8?

Opened this issue ยท 7 comments

Hello there,

So far these client libs were fantastic!
We are really looking forward to implementing the client with PHP 8.0.

Would you please let us know if is it possible? Or when it will be?

Hi. We don't have that planned right now. PHP 8 is interesting, but has the same problem PHP 7 and previous versions have - horrible documentation for module development, and bad support. I think Writing PHP Extensions is the only reasonable doc for extension development it in the last 5 years, and it's now almost a year old and doesn't talk about PHP 8.

The PHP client has been moving forward slowly with community support. It is not a first tier client for Aerospike (like Java, Go, Python, etc). There is a full featured, actively developed alternative, which is the REST client for Aerospike. It's easy to generate a PHP REST client from the Swagger - check out aerospike-community/aerospike-client-rest-php.

Something new in PHP 7.4 is the user-level documented and supported PHP Foreign Function Interface (FFI).

Using that FFI any PHP programmer should be able to write something in PHP code alone that will work both in PHP 7.4 and PHP 8.0 and into the future as long as there is a aerospike-client-c.

With any FFI you really need to be careful and fully understand the memory management behaviors of the C client you are calling. But everything is then documented. It is not bug free, but there is some support and a list of known bugs.

Obviously when using multiple threads and/or php-fpm you need to be aware of thread and object lifetime issues.
Still I think it is a prettier world than what you see at the C-programmer level inside the guts of PHP itself and there is generally only one way to do something, as contrasted with the multiple confusing ways of writing a PHP extension module.

Now that active support for PHP 7.x ends in eight days I will raise this topic again.
Did the situation with PHP documentation get any better? Do you plan to add support for PHP 8 anytime soon?

PHP 7.4 Support ends after 8 days.
When will PHP 8.0 >= support come, so I can't switch to PHP 8.0 >= versions.

Speaking for applications that I have been involved with, the product lifecycle path has been to migrate PHP clients to use the Aerospike Rest Proxy. The foreign function interface methodology that I mentioned over a year ago is just too complex to justify the effort compared to the ease of using the HTTP/REST interface.

thias commented

Work on PHP 8 support seems to have started. But throwing away this extension entirely and instead leveraging ext-php-rs and the Rust Client, which is an interesting choice.

https://github.com/aerospike/php-client

khaf commented

That is correct, we decided to go with the Rust client. We invite everyone to try the new extension and give us feedback.