Closed brandonkelly closed 3 years ago
Simply adding type declarations to Imagine\Imagick\Imagick::thumbnailImage()
won’t work as that would cause a similar error for environments running Imagick < 3.5; plus you’d still have the conflict between the $legacy
and $filter
argument.
Is there a good reason why Imagine’s thumbnailImage()
must extend the base method, as opposed to being declared as a completely new method name?
class_exists('Imagine\Imagick\Imagick');
Unable to reproduce this, class_exists('Imagine\Imagick\Imagick')
returns false
in my setup.
Declaration of Imagine\Imagick\Imagick::thumbnailImage(…) must be compatible with Imagick::thumbnailImage(…):
In which file on which line exactly does this error occur?
There seems to be no Imagine\Imagick\Imagick
class in this library.
There seems to be no
Imagine\Imagick\Imagick
class in this library.
But it looks like your fork of the library does have that class: https://github.com/pixelandtonic/Imagine/blob/develop/src/Imagick/Imagick.php
Doh! Sorry about that. It’s been a while and I didn’t realize that was something we had done on our end 🤦♂️
Issue description
Imagine\Imagick\Imagick::thumbnailImage()
has been semi-incompatible withImagick::thumbnailImage()
since Imagick 3.4, which added a new$legacy
argument, which conflicts with the Imagine-added$filter
argument.Now with Imagick 3.5 (released 3 days ago with PHP 8 support), Imagine’s
thumbnailImage()
is fully incompatible with the core extension, which now has type declarations for each of its methods, leading to this PHP error:What version of Imagine are you using?
1.2.4
What's the PHP version you are using?
8.0.3
What's the imaging library you are using [gd/imagick/gmagick/any]?
Imagick 3.5.0
What's the imaging library configuration
Minimal PHP code to reproduce the error: