Hello! I tried to deploy a Laravel project in Digitalocean App Platform but it fails with following error:

  • Installation request for phpseclib/bcmathcompat 1.0.6 -> satisfiable by phpseclib/bcmathcompat[1.0.6]. phpseclib/phpseclib 2.0.30 requires php >=5.3.3 -> satisfiable by php[7.1.33, 7.2.26, 7.2.27, 7.2.28, 7.2.29, 7.2.30, 7.2.31, 7.2.32, 7.2.33, 7.2.34, 7.3.13, 7.3.14, 7.3.15, 7.3.16, 7.3.17, 7.3.18, 7.3.19, 7.3.20, 7.3.21, 7.3.22, 7.3.23, 7.3.24, 7.3.25, 7.3.26, 7.4.10, 7.4.11, 7.4.12, 7.4.13, 7.4.14, 7.4.2, 7.4.3, 7.4.4, 7.4.5, 7.4.6, 7.4.7, 7.4.8, 7.4.9, 8.0.0, 8.0.1].

I see in github project of bcmathcompat (https://github.com/phpseclib/bcmathcompat) that in Heroku environment they suggest to execute command:

composer require phpseclib/bcmath_compat:1.0.4

I insert it in build command of Digitalocean App Platform but problem persist. Any suggestion? Thanks!

1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

The composer command you reference modifies the composer.json file in your repo. Download composer locally, run the command, and commit the updated composer.json file. Our build process tries to prepare the environment in advance of the build_command. This process includes loading composer dependencies, so it’s likely the error is happening before the build_command is executed.

With regard to composer2:
The rollout of composer2 caused some problems with existing applications and was rolled back. We’re currently working on a strategy to rollout the update with impacting existing apps.

D'oh! I’m an idiot, I didn’t think to launch comand locally. Thanks cbaker!