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

Fix compatibility with php 8.4 and newer ImageMagick library versions #699

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

michalananapps
Copy link

  • Fix skewness and kurtosis test after 7.1.1-24 calculation method change
  • declare MAGICK_LIB_VERSION_GTE macro to help preprocessor code filtering
  • replace php_strtolower wtih zend_str_tolower method calls due to deprecation in 8.4

* Fix skewness and kurtosis test after 7.1.1-24 calculation method change
* declare MAGICK_LIB_VERSION_GTE macro to help preprocessor code filtering
* replace `php_strtolower` wtih `zend_str_tolower` method calls due to deprecation in 8.4
@michalananapps
Copy link
Author

@Danack Check this, please :)

@tianon
Copy link

tianon commented Nov 25, 2024

(see also #690, which this has overlap with)

Copy link

@MacGritsch MacGritsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Patch works fine for PHP 8.4 installed by homebrew on macOS (ARM).

@Fabccc
Copy link

Fabccc commented Nov 29, 2024

I have some problems when installing the patch with php-ext-installer, her's the result:

> [stage-2 6/9] RUN install-php-extensions gd soap zip pdo pdo_mysql intl pcntl opcache redis apcu gnupg amqp xdebug https://codeload.github.com/michalananapps/imagick/tar.gz/refs/heads/test:
190.9 PHP-Parser-5.0.0/phpstan.neon.dist
190.9 Saved /tmp/pear/temp/imagick/ImagickKernel_arginfo.h
190.9 Saved /tmp/pear/temp/imagick/ImagickPixel_arginfo.h
190.9 Saved /tmp/pear/temp/imagick/ImagickDraw_arginfo.h
190.9 In /tmp/pear/temp/imagick/Imagick.stub.php:
190.9 Imagick::newImage(): Parameter format has null default, but is not nullable
190.9 make: *** [Makefile:191: /tmp/pear/temp/imagick/Imagick_arginfo.h] Error 1
190.9 make: *** Waiting for unfinished jobs....
190.9 Installing header files:          /tmp/pear/temp/pear-build-defaultuserfkfl889oear21Ro6rRH/install-imagick-3.7.0/usr/local/include/php/
190.9 ERROR: `make -j4 INSTALL_ROOT="/tmp/pear/temp/pear-build-defaultuserfkfl889oear21Ro6rRH/install-imagick-3.7.0" install' failed
------
_Dockerfile.temp:44
--------------------
  42 |     RUN sed -i '/disable ghostscript format types/,+6d' /etc/ImageMagick-6/policy.xml
  43 |     
  44 | >>> RUN install-php-extensions  https://codeload.github.com/michalananapps/imagick/tar.gz/refs/heads/test
  45 |     
  46 |     # --------------------------------------------------- Scripts ------------------
--------------------

@michalananapps
Copy link
Author

@Fabccc This PR originates from the master branch, which clearly hasn't been updated in a long time. I've prepared a fix based on the develop branch: develop-php8.4-patch. The PR is available here: #704. Try that patch - it should work.

@Fabccc
Copy link

Fabccc commented Dec 4, 2024

@michalananapps Hi!
Thanks for the quick reply, I tried it and it works like charm ! thank you !

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.

4 participants