Heroku/PHP Quick Tip #2 – Adding PHP extensions

If you are used to using Composer, adding PHP extensions to a Heroku PHP app is really easy. For adding the GD library, just add the extension as follows to the “require” section of your project’s composer.json file:

"require": 
{ 
​   "ext-gd": "*", 
    "laravel/framework": "4.1.28", 
    "doctrine/dbal": "2.4.2", 
    "guzzlehttp/guzzle": "4.0.2", 
    "way/generators": "2.6", 
    "fzaninotto/faker": "v1.3.0" 
},

Heroku has a complete list of already included extensions and those available to be added during deployment.

comments powered by Disqus