Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ekn's avatar
Level 1

Notify about necessary PHP extension on deployment

After deploying my app, while testing I got this error in my javascript console about a missing extension:

The PHP GD extension is required, but is not installed. 

Of course I googled and installed the missing extension with: sudo apt-get install php7.2-gd

But I want to reduce possibilities for errors like this, since it could always happen that an extension or something is missing on a testing/production server. Is there a way to notify on first deployment (i.e. when running composer install) about missing or required extensions??? Or even to run a bash command?

Thanks!

0 likes
2 replies
Wraith's avatar

Composer has nothing to do with server system. But u can use Docker

Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

Yes you can just run

composer check-platform-reqs

Will output a list of all required extensions and if they are installed (success)

Please or to participate in this conversation.