imagick icon indicating copy to clipboard operation
imagick copied to clipboard

Fix nullable in Imagick.stub.php

Open mvorisek opened this issue 1 year ago • 1 comments

CI build error:

Imagick::newImage(): Parameter format has null default, but is not nullable
make: *** [Makefile:195: /tmp/pear/temp/imagick/Imagick_arginfo.h] Error 1

mvorisek avatar Jun 13 '24 10:06 mvorisek

@Danack can you to merge this PR in order to support PHP 8.4/php-src master?

mvorisek avatar Jun 18 '24 15:06 mvorisek

Thanks. I also added a test and fixed the parameter parsing which needed tweaking.

I also fixed another one that showed up in ImagickKernel::fromMatrix.

I'm going to leave the numbers in the YML for the moment for reasons.

btw, if you have time to look at https://github.com/Imagick/imagick/issues/679 it would be appreciated.

Danack avatar Jul 02 '24 13:07 Danack

I'm going to leave the numbers in the YML for the moment for reasons.

May I know your concerns?

The numbers in YML must be escaped in quotes otherwise version like 8.0 is parsed as floating point number instead of string which converts such value (when casted back to a string) into 8 string which is unwanted.

Example:

image

mvorisek avatar Jul 06 '24 07:07 mvorisek

Thanks for looking into this!

Was there a reason to not merge this? I'm getting this error now as well:

docker run -it php:8.4-rc /bin/bash
# in the container:
curl -sSLf \
        -o /usr/local/bin/install-php-extensions \
        https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions && \
    chmod +x /usr/local/bin/install-php-extensions && \
    install-php-extensions imagick/imagick@master

Results in the following error:

In /tmp/pear/temp/imagick/Imagick.stub.php:
Imagick::newImage(): Parameter format has null default, but is not nullable
make: *** [Makefile:191: /tmp/pear/temp/imagick/Imagick_arginfo.h] Error 1
ERROR: `make -j10 INSTALL_ROOT="/tmp/pear/temp/pear-build-defaultuser2fmsck2230q5bGTayAL/install-imagick-3.7.0" install' failed

annuh avatar Nov 07 '24 13:11 annuh

Feel free to use my https://github.com/mvorisek/image-php Docker images. There are built every 2 weeks with a lot of extensions - https://github.com/mvorisek/image-php/blob/master/test.php incl. this one.

mvorisek avatar Nov 11 '24 14:11 mvorisek