Search code examples
phpgoogle-app-enginecomposer-phpphp-extensiongoogle-app-engine-php

Use php extensions in Google Cloud App Engine


I'm trying to run a symfony4 application in the Google Cloud App Engine following this instructions.

My app has a dependency which itself depends on php-gd. This extension seems to be unavailable since composer fails with the requested PHP extension gd is missing from your system..

How would I have to modify the tutorial to have the extension available?

Can this be solved with a php.ini file or do I need a custom environment?

Alternatively since I don't need the parts of my dependency which require php-gd, is there a way to get composer run with the --ignore-platform-reqs flag?


Solution

  • Google Cloud App Engine only seems to load extensions required in the top level composer.json's require.

    It does not seem to resolve dependencies recursevly.

    Therefore a workaroud is to add all required extensions manually to the projects composer.json.