NativePHP / laravel

Laravel wrapper for the NativePHP framework
https://nativephp.com
MIT License
3.09k stars 159 forks source link

[Bug]: Class "Imagick" not found #297

Closed hans-thomas closed 4 months ago

hans-thomas commented 4 months ago

What were you trying to do?

I want to manipulate images on my native PHP application.

What happened?

It throws an error because the Imagick extension isn't built into the PHP binaries.

How to reproduce the bug

I just installed spatie/image and tried to resize an image.

Package Versions

{ "installed": [ { "name": "nativephp/electron", "direct-dependency": true, "homepage": "https://github.com/nativephp/electron", "source": "https://github.com/NativePHP/electron/tree/0.6.3", "version": "0.6.3", "description": "Electron wrapper for the NativePHP framework.", "abandoned": false }, { "name": "nativephp/laravel", "direct-dependency": false, "homepage": "https://github.com/nativephp/laravel", "source": "https://github.com/NativePHP/laravel/tree/0.5.2", "version": "0.5.2", "description": "Laravel wrapper for the NativePHP framework.", "abandoned": false }, { "name": "nativephp/php-bin", "direct-dependency": false, "homepage": "https://nativephp.com", "source": "https://github.com/NativePHP/php-bin/tree/0.4.0", "version": "0.4.0", "description": "PHP binaries used by the NativePHP framework", "abandoned": false } ] }

PHP Version

PHP 8.3.3

Laravel Version

v11.7.0

Node Version

v21.6.2

Which operating systems have you seen this occur on?

Linux

OS version

Operating System: Manjaro Linux KDE Plasma Version: 5.27.11 KDE Frameworks Version: 5.115.0 Qt Version: 5.15.12 Kernel Version: 6.6.26-1-MANJARO (64-bit) Graphics Platform: X11 Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz Memory: 15.5 GiB of RAM Graphics Processor: Mesa Intel® HD Graphics 530 System Version: V1.12

Notes

The Imagick extension is also available for windows link.

simonhamp commented 4 months ago

This isn't a bug. The Imagick extension hasn't been added because it is not yet supported across all platforms for static compilation.

The static compilation is the critical part here as it's the secure build which won't allow a nefarious third-party to load custom extensions at runtime.

I'll move this to the Ideas discussion category.