What to do when your Internet is too slow for composer?

Like the problems I was having with Docker timeouts, I recently had problems on my slow home Internet getting PHP’s composer to build the assets for a project.

The error message contained “exceeded the timeout of 300 seconds” so it was easy to identify.

The fix, run from the terminal was:


Where the number is the number of seconds before a composer operation timesout.  This fix is temporary, for a permanent solution have a look at how to make environment variables persist.