Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Feb 14, 2024

Conversation

uuf6429
Copy link
Contributor

@uuf6429 uuf6429 commented Feb 2, 2024

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.

@uuf6429 uuf6429 changed the title Avoid PHP 8.3 FFI::cast deprecation (fixes #226) Avoid PHP 8.3 FFI deprecations (fixes #226) Feb 2, 2024
@kminek
Copy link

kminek commented Feb 3, 2024

@jcupitt can this be merged soon? :)

@jcupitt
Copy link
Member

jcupitt commented Feb 3, 2024

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

@jcupitt
Copy link
Member

jcupitt commented Feb 3, 2024

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
Copy link
Contributor Author

uuf6429 commented Feb 3, 2024

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.

@uuf6429 uuf6429 marked this pull request as draft February 3, 2024 17:03
@dmitryuk
Copy link

Looking for merging this...

@kleisauke
Copy link
Member

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 jcupitt marked this pull request as ready for review February 14, 2024 12:56
@jcupitt jcupitt merged commit c365be7 into libvips:master Feb 14, 2024
4 of 5 checks passed
@jcupitt
Copy link
Member

jcupitt commented Feb 14, 2024

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

@uuf6429 uuf6429 deleted the fix/avoid-php83-cast-deprecations branch February 14, 2024 19:38
@Tak-Pesar
Copy link

i have some problem like that :
PHP Fatal error: Maximum call stack size of 8339456 bytes (zend.max_allowed_stack_size - zend.reserved_stack_size) reached. Infinite recursion?
When will it be fixed ?
And there is no way until it is fixed ?

@jcupitt
Copy link
Member

jcupitt commented Jan 11, 2025

@Tak-Pesar, this is a PHP bug, you need to disable stack size checking, have a look at the php-vips README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants