Push rejected, failed to detect set buildpack heroku/php
In my case, I needed to have a composer.json file in the same directory where my git folder is. Also make sure you included the json file in your commit before trying to do git push heroku master.
My composer.json file contains only this so it's a valid json.
{ }