Using composer locally with heroku php buildpack

In order to run composer locally so that you can get the composer.lock file, you need to run composer as follows - locally:


php composer.phar require --dev "heroku/heroku-buildpack-php:*"
or

composer require --dev "heroku/heroku-buildpack-php:*"

if you have a symlink



Other issues:

You get an error like:

  Problem 1

    - The requested PHP extension ext-memcached * is missing from your system.

You need to install memcached in you php environment.

brew install libmemcached
pecl install memcached

If you get an error:

Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

ERROR: `phpize' failed

You need to run 

brew install pkg-config
brew install autoconf

Then run pecl install memcached again...

Comments