libvips / php-vips

php binding for libvips
MIT License
615 stars 25 forks source link

Avoid PHP 8.3 FFI deprecations (fixes #226) #231

Closed uuf6429 closed 9 months ago

uuf6429 commented 9 months ago

This probably isn't the ideal way (the ideal way would be dependency injection), but it's fast and backward-compatible. I tested this briefly on my machine and it seemed to work well.

kminek commented 9 months ago

@jcupitt can this be merged soon? :)

jcupitt commented 9 months ago

Sorry! I'll spend some time on this later today.

jcupitt commented 9 months ago

This looks good, and you say, nice and simple.

We just need to fix the unit test failure with php 8.3. I'm not sure what's causing the stack overflow and I don't have php8.3 installed or I'd investigate myself :(

uuf6429 commented 9 months ago

This looks good, and you say, nice and simple.

We just need to fix the unit test failure with php 8.3. I'm not sure what's causing the stack overflow and I don't have php8.3 installed or I'd investigate myself :(

I saw that on my mac and thought it was just a mac fluke. I'll investigate it myself, no problem.

dmitryuk commented 9 months ago

Looking for merging this...

kleisauke commented 9 months ago

The salient part of the unit test failure is:

PHP Fatal error:  Throwing from FFI callbacks is not allowed in /home/runner/work/php-vips/php-vips/src/VipsOperation.php on line 308

https://github.com/libvips/php-vips/actions/runs/7758073643/job/21184045945#step:6:42

I assume it's due to the use of assert() within GObject::getMarshaler(). PR #233 would probably fix that.

jcupitt commented 9 months ago

Let's merge and do any final tweaks in a followup. Thanks for doing this work, and sorry for being so slow :(