php-imagine / Imagine

PHP Object Oriented image manipulation library
https://imagine.readthedocs.io
Other
4.42k stars 529 forks source link

Fix compatibility with PHP 8.0 #740

Closed ausi closed 4 years ago

ausi commented 4 years ago

In PHP 8.0 the GD resources got replaced with GdImage objects, see https://github.com/php/php-src/commit/8aad466c42b5feabc7565856eb006c326f35382f

ausi commented 4 years ago

It looks like the nightly build doesn’t run through https://travis-ci.org/github/avalanche123/Imagine/jobs/726730923
I don’t know how to fix this.

mlocati commented 4 years ago

I fixed the compilation of the imagick PHP extension, but it seems that gmagick extension is not ready for PHP 8 (see https://pecl.php.net/package/gmagick and http://svn.php.net/viewvc/pecl/gmagick )

mlocati commented 4 years ago

PS: for gmagick I submitted this bug report.

ausi commented 4 years ago

Besides the GMagick error and the incompatible dev-dependencies PHP 8.0 compatibility should be OK with this pull request I think.

ausi commented 4 years ago

It looks like there is not much activity in GMagick (see https://github.com/vitoc/gmagick/pull/48 ).

@mlocati should we merge this as it is now to have at least GD and IMagick support for PHP 8.0?

ausi commented 4 years ago

Merging at least the fix for the GD incompatibilities would really help me out.

That’s pretty much everything this PR does. There don’t seem to be any other incompatibilities with PHP 8.0.

The planned release date for PHP 8.0 is less than a month away, so I think it would be a good time to merge this PR ☺️