imagick icon indicating copy to clipboard operation
imagick copied to clipboard

PHP 8.4 php_strtolower warnings

Open lukaszmarcola opened this issue 1 year ago • 1 comments

Hello, since php84 rc1 some functions like php_strtolower was removed and they suggest to use zend_str_tolower: https://github.com/php/php-src/commit/85e6688791771f4af575de2421e4f9c1638805a5#diff-8792658491c2da2691aa3492fee6304154346d593fa1d787ebb897d0467d58efR379

During compilation, I get:

/home/build/rpmbuild/BUILD/imagick-3.7.0/imagick.c: In function 'php_imagick_read_property':
/home/build/rpmbuild/BUILD/imagick-3.7.0/imagick.c:606:7: warning: implicit declaration of function 'php_strtolower'; did you mean 'php_strtok_r'? [-Wimplicit-function-declaration]
       php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval));
       ^~~~~~~~~~~~~~
       php_strtok_r

An update of these functions is probably required.

lukaszmarcola avatar Sep 25 '24 09:09 lukaszmarcola

see https://github.com/Imagick/imagick/pull/690

for PHP 8.4 Docker images you can use https://github.com/mvorisek/image-php

mvorisek avatar Sep 26 '24 09:09 mvorisek

A hotfix for Dockerfile: https://github.com/Imagick/imagick/issues/698#issuecomment-2692289703

jtomek avatar Mar 01 '25 15:03 jtomek

Fixed in develop branch

bukka avatar Mar 02 '25 10:03 bukka

I know, @mvorisek proposed a fix in September.

As it's taking a long time to push it to the master, I am linking a hotfix here for those who do not want to introduce other "unproven" code.

The dev. code (dev branch is 108 commits ahead of master.) in the time of writing.

jtomek avatar Mar 02 '25 11:03 jtomek

I got access to do the maintanance about a week ago and things are now in progress to release everything once it gets all stable enough. I have got a weekly slot on this as part of my PHP Foundation funded time so it should not hopefully take too long.

bukka avatar Mar 02 '25 11:03 bukka