jakyeru/laravel-shell
Run shell commands from Laravel through a simple, testable API. jakyeru/laravel-shell wraps process execution, captures output and exit codes, and fits neatly into Artisan commands, jobs, and services for reliable command-line automation.
composer require valentinneaga/laravel-shell. There is no configuration step required for the default behaviour — the service provider registers the shell command on boot.^3.0 instead; the major bump signals that the Laravel 13 support was not added as a widening constraint (e.g. ^11|^12|^13) but as a new major. Check composer.json in the tag before upgrading a multi-app codebase.src/Terminal.php — it is one of only two things that changed in v4.0.0, so it is the file that will bite you. Then the service provider, to see how the command is registered and whether anything is publishable.dd() through controllers. Resolve services, run Eloquent queries, dispatch a job and inspect the result, all against real container bindings and real config — which is exactly the gap php artisan tinker leaves when you need framework bootstrapping plus command execution.Terminal.php change is most likely to surface as a behavioural difference in non-TTY contexts, and you want that discovered on day one, not in a deploy script.$this->input->isInteractive() and an environment check (app()->isLocal() or an explicit allowlist). A shell that can be reached from a queued worker or a web route in production is an incident waiting to happen.^3.0 and an app on ^4.0 can coexist while you migrate. The Terminal.php change makes direct static calls risky across versions.Terminal.php change is the classic signature of an unannounced breaking change: altered method signatures, changed return types, or different handling of output/streams. Review compare/v3.0.0...v4.0.0 before upgrading anything you depend on.php constraint in the v4.0.0 tag against your runtime images. A package upgrade that silently requires a newer PHP than your base image is a build failure at the worst possible moment.Terminal.php, re-test inside Docker, in CI, and behind a queued job, not just in your local terminal.escapeshellarg) or, better, passed as an argument array rather than interpolated into a string. User-influenced input into a shell wrapper is remote code execution with extra steps.-vvv to see the underlying process invocation; if the command exits instantly with no output, check proc_open/exec in disable_functions in php.ini — shared hosts and hardened containers disable them and the failure looks like a package bug.vendor/.4.0.1 clarifying or fixing the Terminal.php change. Don't build deep abstractions on top of v4.0.0 internals until the API settles.How can I help you explore Laravel packages today?