By budiarsana
In App Platform for PHP Environment. How do i force the composer install to install the packages including dev?
Currently it looks like the installing dependencies process only installed the packages for prod and no dev. I tried to use build_command: composer install --dev in app spec.yml but no luck/still error.
As with Symfony Framework, there are “post-install-cmd” scripts where it’s executed after package installed and since the env are dev. It expected if the application have installed the package in “require-dev” part.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi, Personally I found more convenient to drop a Dockerfile into the root folder of the git repository and DO will build it for you. This is worked for me better.
Hi,
Usually, the recommendation is that if a dependency is needed to build the app for production, then it should be a regular dependency and not a dev dependency.
However, if you really want to, you can configure the build to install dev dependencies. I must say that this is not officially supported so there are no guarantees that this method will work forever. To install dev dependencies, add an environment variable called HEROKU_PHP_INSTALL_DEV with no value. Leave the value text field empty. This is very important otherwise it might break the build.
Again, I would recommend doing this only for testing. If it fixes the issue then I would recommend updating your composer.json and moving the necessary dependencies from require-dev to require (and removing the workaround).
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.