Stoormz'log
Erreur : Class Gregwar\Image\Adapter\Imagick contains 1 abstract method and must therefore be declared abstract or implement the remaining methods

Erreur : Class Gregwar\Image\Adapter\Imagick contains 1 abstract method and must therefore be declared abstract or implement the remaining methods


Un problème rencontré lors de la récupération d'un projet Symfony: 

root@1155763f419d:/home/site/wwwroot# tail -f var/log/dev/dev.log | grep CRITICAL
[2024-01-16T15:01:11.503441+00:00] php.CRITICAL: Uncaught Error: Class "Imagick" not found {"exception":"[object] (Error(code: 0): Class \"Imagick\" not found at /home/site/wwwroot/src/Service/ImageService.php:131)"} []
[2024-01-16T15:01:11.514553+00:00] php.CRITICAL: Fatal Error: Class Gregwar\Image\Adapter\Imagick contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Gregwar\Image\Adapter\AdapterInterface::saveWebp) {"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Error: Class Gregwar\\Image\\Adapter\\Imagick contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Gregwar\\Image\\Adapter\\AdapterInterface::saveWebp) at /home/site/wwwroot/vendor/gregwar/image/Gregwar/Image/Adapter/Imagick.php:7)"} []

Cette erreur indique que la classe "Imagick" n'est pas disponible, il faut donc procéder à l'installation de l'extension php-magick  ainsi que ses dépendances:

$ apt-get install imagemagick php8.2-imagick

 

0 commentaire(s)