Two gotchas when your Laravel app shells out to a CLI
TL;DR If a web request shells out to a slow CLI ( docker , kubectl , rsync …), move it to a queued job — PHP-FPM/nginx will kill it at ~30s anyway. Processes spawned from an HTTP worker inherit almost no environment : no HOME , a bare PATH . Tools that read ~/.docker or ~/.kube silently fail. Inject the env explicitly. Wrap the shell-out in a driver/contract so you can fake it in tests instead of…
We haven't written up this one. Dev.to has the full story — the link below goes straight to it.

