A bit old but just in case someone new is looking for a solution, updating your PHP version can fix the issue.
Also you should be committing your composer.lock file and doing a composer install on a production environment which is less resource intensive.
More details here: https://github.com/composer/composer/issues/1898#issuecomment-23453850