huangdijia/laravel-horizon-restart
A lightweight Laravel package for restarting Horizon workers programmatically or from an Artisan command. Useful after deployments or config changes, it sends Horizon's restart signal so workers reload gracefully without manual intervention.
What this package is. huangdijia/laravel-horizon-restart is a small utility package that exposes Laravel Horizon's worker-restart capability (horizon:terminate / horizon:restart) through an application-facing surface (route/command), so operators can recycle queue workers without SSH access to each host. It is a convenience layer, not infrastructure — Horizon itself remains the runtime, and the package is a thin wrapper over a first-party Artisan signature.
What v3.1.0 changes. v3.1.0 is a pure compatibility release: Laravel 12.x support (via Laravel Shift) and PHP 8.4 support. Minor version bump, no breaking changes, no new features, no deprecations, no configuration or API surface changes announced. The only material signal is that the package has been validated against the current Laravel major and the current PHP minor, and that a second contributor (Laravel Shift automated tooling) has touched the repo.
Architecture fit. Good architectural fit if the estate is already on Horizon. It does not introduce a new persistence layer, queue driver, or daemon — it is a control-plane button. If the estate is not on Horizon (e.g., database queue + queue:work under Supervisor), this package is irrelevant. Fit is therefore conditional on an existing Horizon commitment.
Integration feasibility. High. Standard Composer install with Laravel package auto-discovery; typical integration is composer require, publish config, and gate the route behind auth/middleware. No database migrations, no schema, no long-running process to manage.
Technical risk (ranked).
tries/timeout/retry_after and idempotency. This is a data-correctness risk owned by the application, not the package — but the package makes the action one click away, which increases frequency.Key questions for the maintainer / internal owners.
composer.json constraints for laravel/framework, php, and laravel/horizon? Is Horizon 5.x required?Verdict: low technical risk as code, medium operational risk as a control plane. Approve for evaluation in a non-production environment; production adoption should be conditional on authentication review and audit logging.
Stack fit. Targets Laravel applications running Horizon on Redis. v3.1.0 explicitly aligns with Laravel 12.x and PHP 8.4, so it fits an estate that is current or moving current. It also remains usable on the prior majors (v3.0.0 was the Laravel 11-era line), giving a clean bridge across the upgrade window.
Compatibility and migration path.
^3.1 and verify the resolved php / laravel/framework / laravel/horizon constraints against the target application's composer.json before merging. The release note asserts support; Composer's solver is the authority.Sequencing.
composer update huangdijia/laravel-horizon-restart --with-dependencies to see the full transitive delta.Alternative to weigh. If the only need is "restart workers on deploy," the first-party php artisan horizon:terminate invoked from the deploy pipeline may satisfy the requirement with zero new dependencies. This package earns its place only when non-engineers or remote operators need the capability without shell access.
Maintenance. Very low surface area, so low ongoing maintenance — but ownership sits with a single maintainer. Budget for the possibility of fork-and-vendor. The Laravel Shift contribution is a positive signal for upgrade cadence, though it is automation rather than sustained human maintainer depth.
Support. Community OSS, best-effort. No vendor SLA. Internal teams must own the runbook: what a restart does, when to use it, who may invoke it, and how to confirm success.
Scaling. The package itself does not scale — it is stateless. The scaling concern is operational: in a many-node Horizon deployment, restart coverage depends on request fan-out or on Horizon's own supervisor behavior. Confirm whether a per-node call, a load-balanced call, or a broadcast mechanism is required before assuming fleet-wide coverage.
Failure modes to design for.
retry_after > timeout, graceful termination.Ramp-up. Minimal for a Laravel-fluent engineer (hours). The real ramp is not technical — it is procedural: training operators that "restart Horizon" is a production action with queue-durability implications, and that a 200 response is not proof of success.
Recommendation. Adopt v3.1.0 if the org is on Horizon, needs remote restart capability, and is willing to fund the auth + audit + verification work around it. Do not adopt it as the sole mechanism for deploy-time worker recycling. Track the Laravel 13 / PHP 8.5 compatibility window as the next meaningful review trigger.
How can I help you explore Laravel packages today?