Open nawarian opened 4 years ago
Thanks, initially I was limiting the scope to just PHP 7.4, as the stubs require PHP 7.4 due to type signatures in method calls. However, supporting PHP 7.3 via the C code isn't an issue. Thanks for catching this I'll make an update to change this and test on 7.3.
Just an update I've been trying on and off to support 7.3. While I am able to build, the property writers are segment faulting. So this will have to be an ongoing effort. I don't want this to slow down the binding's implementation, so, for now, I'll push 7.3 support to a different branch. I looked at how php-src handles 7.4 and 7.3 and they don't, they just keep completely different repos, so if-defs are not littered all over the place for various php versions.
I came to report an issue while compiling the extension using php
7.3.16
.The ZEND_THIS constant Seems like the constant
ZEND_THIS
is not available there. Before this value used to be fetched withgetThis()
in this repo. With php7.4
it works. ReplacingZEND_THIS
withgetThis()
solves the issue on php 7.3.The zend_std_write_property() call Another thing quite common in this repo is the following line:
This happens, for example, here: https://github.com/joseph-montanez/raylib-php/blob/89a9f1fe951897ae31a9df4bc8af7ce9db20d5b1/raylib-charinfo.c#L231
This seems to be problematic on php
7.3.16
aszend_std_write_property()
returns void andvalue
is a zval, passed for writing as the third parameter. Removing the assignment seems to solve the issue.Note: I'm running MacOS Catalina. But this seems to be independent from build environment.
What is the minimum version supported?
I'd be happy to send out some pull requests if php 7.3 is supposed to be supported. I'm not a C expert but I think I can help a bit there.
Cheers!