For repetitive processes in my projects, I typically use Composer's script functionality to make running scripts and executing binaries simpler for myself and my team. One thing that I run into often is long-running processes, such as watcher scripts or background processes, exceeding Composer's default script timeout of 300 seconds. An example of where I see this most often is large test suites that can take more than 5 minutes to run, normally end-to-end tests.

To disable Composer's default timeout, you need to update the entry in the scripts section of your composer.json file to call the Composer\\Config::disableProcessTimeout method before running your own code. {"scripts": {"e2e": ["Composer\\Config::disableProcessTimeout", "./bin/run-tests.sh --browser"], }}
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners