- How do I install jakyeru/laravel-shell in a Laravel application?
- Install it with Composer using composer require jakyeru/laravel-shell. The package follows the standard Laravel package contract, so its service provider is auto-discovered and it registers a container binding and facade, with a publishable config file. Before installing, read the composer.json at the tag you intend to use to confirm the exact PHP and illuminate/* constraints, since these are not documented in the release notes.
- Does jakyeru/laravel-shell support Laravel 13?
- Yes. The headline change in v4.0.0 is Laravel 13 support, and the major version bump is almost certainly semver signalling that older framework versions are dropped rather than an API redesign. Confirm the precise illuminate/* and PHP ranges from composer.json at the v4.0.0 tag before scoping the upgrade.
- Can I use jakyeru/laravel-shell on Laravel 11 or Laravel 12?
- Pin to ^3.0 and take no action from the v4.0.0 release. Because v4 raises the framework floor to Laravel 13, it cannot be adopted on a Laravel 11 or 12 codebase in isolation, and there is no functional feature in v4.0.0 that justifies a forced framework upgrade. Treat the framework bump and the package bump as a single sequenced work item.
- How do I capture stdout, stderr, and the exit code from a command?
- You build the command fluently, execute it, and then inspect the result object for captured standard output, standard error, and the exit status. That lets you branch on failure codes and log error output separately from normal output. Because the v4.0.0 changelog is only two lines, verify the exact accessor names and return shape against the source at your pinned version before writing call sites.
- How do I set a timeout or working directory for a shell command?
- The package supports configurable timeouts and working directories so commands do not hang indefinitely or run from an unexpected path. These are typically set when constructing the command, with defaults available through the published config file. Always set an explicit timeout for anything invoked from a queued job or scheduled task so a stuck process cannot consume a worker indefinitely.
- Can I run shell commands from an Artisan command or a queued job?
- Yes. The package is designed for exactly those contexts, along with service classes and internal tooling, and it resolves through Laravel's container. In jobs, combine it with an explicit timeout and wrap execution in error handling so a non-zero exit code fails the job deliberately rather than silently. Keep the call sites behind a thin internal adapter so you can swap or patch the package without touching feature code.
- Is jakyeru/laravel-shell safe to use on a user-facing request path?
- No. The package's core capability is arbitrary command execution, which makes it a privileged dependency and a poor fit for any route reachable by untrusted users. Restrict it to back-office, ops, and internal tooling scenarios where the operator is already trusted. The available notes show no mandatory authorization or allowlist mechanism, so gate access yourself and never interpolate user input into a command string.
- What changed in jakyeru/laravel-shell v4.0.0, and is there a migration guide?
- The release notes are a two-line changelog with no migration guide, and the merged pull requests all come from the sole maintainer with no external review. One commit titled Updated Terminal.php in a major release deserves a manual diff review, since command construction, escaping, working directory, and output capture are all security-relevant. Assume anything touching the facade, config keys, or the Terminal class is affected until you have proven otherwise, and grep every call site first.
- How do I test code that runs shell commands with jakyeru/laravel-shell?
- The package integrates with Laravel's container and testing workflow, so resolve it from the container rather than instantiating classes directly and substitute a fake in your test suite. Wrapping every call site behind an internal adapter makes that substitution straightforward and keeps tests fast and deterministic. Avoid asserting on real process output in unit tests; stub the boundary instead.
- What are the alternatives to jakyeru/laravel-shell, and is it well maintained?
- The main alternatives are Laravel's own Process facade and the underlying Symfony Process component, both of which cover command construction, timeouts, and output capture without an extra dependency. laravel-shell's value is its Laravel-native fluent wrapper, publishable config, and container integration, which may or may not be worth a third-party package for your use case. Weigh that against a bus factor of one, two merged PRs from a single author in the latest release, and no evident security disclosure process before committing.