How can I override default Heroku behavior about dependencies installation with Composer? AFAIK Heroku executes composer install --no-dev
by default which is perfect for prod, but what if I intend to deploy PHP application in dev environment on the Heroku server?
So I need somehow to load dependencies from require-dev
section of composer.json. Is it possible? Are there any hooks, events, etc. that could help me with it?
Heroku's PHP support extends to applications using the latest available releases in the PHP 7.4, PHP 8.0 and PHP 8.1 series.
You can pass the --no-dev flag to the install/update commands to tell Composer that you do not want to install the development dependencies (this will also not do dev-autoload autoloading, as we will see). When deploying in production, the command to use is composer install --no-dev .
Access heroku shell with command heroku run bash --app=app-dev
in terminal
So, update composer components with composer update --dev
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With