PHPackages                             okaufmann/laravel-horizon-doctor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. okaufmann/laravel-horizon-doctor

ActiveLibrary[Queues &amp; Workers](/categories/queues)

okaufmann/laravel-horizon-doctor
================================

Checks your Horizon config against the Laravel queue config to ensure everything is configured as expected.

v2.5.2(1mo ago)29.3k↑716.7%1[1 PRs](https://github.com/okaufmann/laravel-horizon-doctor/pulls)MITPHPPHP ^8.4CI passing

Since Nov 7Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/okaufmann/laravel-horizon-doctor)[ Packagist](https://packagist.org/packages/okaufmann/laravel-horizon-doctor)[ Docs](https://github.com/okaufmann/laravel-horizon-doctor)[ RSS](/packages/okaufmann-laravel-horizon-doctor/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (17)Versions (20)Used By (0)

Laravel Horizon Doctor
======================

[](#laravel-horizon-doctor)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4c40dfc1f4cd08b2ea9c270fa661e66edda907f181bb4cd9a0d25e1b0b50371f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f6b6175666d616e6e2f6c61726176656c2d686f72697a6f6e2d646f63746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/okaufmann/laravel-horizon-doctor)[![GitHub Tests Action Status](https://camo.githubusercontent.com/051e6b02ea8e6c0e59b6f4288d663976190d7d2d2dae478ba2c49e11bbbea2c4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6f6b6175666d616e6e2f6c61726176656c2d686f72697a6f6e2d646f63746f722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/okaufmann/laravel-horizon-doctor/actions/workflows/run-tests.yml)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/071e09d92e8cfb293bc8c948f809588b96ac099edc8901e281f955c4c58aaa40/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6f6b6175666d616e6e2f6c61726176656c2d686f72697a6f6e2d646f63746f722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/okaufmann/laravel-horizon-doctor/actions/workflows/fix-php-code-style-issues.yml)[![Total Downloads](https://camo.githubusercontent.com/2f3dd16031488dfddf791f184c2ab9cae188363b5c469661ee5f6f491de459c8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f6b6175666d616e6e2f6c61726176656c2d686f72697a6f6e2d646f63746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/okaufmann/laravel-horizon-doctor)

Checks your Horizon config against the Laravel queue config to ensure everything is configured as expected. Optionally scans queued job/listener/mail classes for common footguns and cross-checks their queues against Horizon.

Installation
------------

[](#installation)

### Requirements

[](#requirements)

- PHP 8.4+
- Laravel 12 or 13 (`illuminate/support` is pulled in by your app)
- [Laravel Horizon](https://laravel.com/docs/horizon) (`laravel/horizon`)

### Install

[](#install)

Require the package with [Composer](https://getcomposer.org/):

```
composer require okaufmann/laravel-horizon-doctor
```

The service provider and `LaravelHorizonDoctor` facade are [auto-discovered](https://laravel.com/docs/packages#package-discovery); you do not need to register them manually.

### Publish configuration (optional)

[](#publish-configuration-optional)

You do not have to publish anything; the package merges its defaults. When you want to change options, run:

```
php artisan vendor:publish --tag=horizon-doctor-config
```

That adds `config/horizon-doctor.php` to your app.

Usage
-----

[](#usage)

```
php artisan horizon:doctor
```

Errors block the exit code by default. Some **warnings** (for example Horizon supervises a queue that is not listed under the same connection in `config/queue.php`) print as warnings only. Use `php artisan horizon:doctor --strict-warnings` or `strict_warnings` in `config/horizon-doctor.php` to fail on those as well. The [GitHub Action](action/README.md) exposes the same behavior via the `strict-warnings` input.

Each Horizon environment prints a **Redis queue overview table** (queue name × **Laravel queue connection** × whether the name is listed in `config/queue.php` for that connection × which supervisors run it × status). Use `--no-overview` or `show_overview` =&gt; `false` in `config/horizon-doctor.php` to hide it (for example in compact CI logs). Run with `-v` (or `verbose` in config) for a short glossary: queue connection vs Redis client vs Horizon supervisor `connection`.

For a compact reference when writing queueable jobs and listeners, see [docs/jobs-horizon-cheatsheet.md](docs/jobs-horizon-cheatsheet.md).

### Queued class scan (optional)

[](#queued-class-scan-optional)

Static analysis of PHP under configurable directories (default: `app/Jobs`, `app/Listeners`, `app/Mail`). **Disabled by default** so config-only runs stay quick and do not depend on your sources being present or parseable.

- **Turn on:** `php artisan horizon:doctor --scan-jobs`, or `scan_queued_classes` =&gt; `true` in published `config/horizon-doctor.php`.
- **Skip once:** `--no-scan-jobs` overrides config.
- **Paths / ignores:** `queued_class_paths` (relative to the app base path), `queued_class_exclude_patterns` (regexes for Symfony Finder `notPath`).

Checks performed when scanning:

- **Job `timeout` vs Redis `retry_after`** for the effective Redis connection (literal `$connection` on the class when present, otherwise `queue.default`) — `strict_job_timeouts` chooses error vs warning when the timeout is not safely below `retry_after`.
- **Queued listeners** — warns if `onQueue()` is only used from `__construct()`; prefer `#[Queue]`, `public $queue`, or the queue at dispatch time.
- **Horizon vs declared queue** — after a scan, each environment section can warn if a class targets a Redis queue/connection that no supervisor handles there.

The published composite action can enable scanning with the `scan-queued-classes` and `strict-job-timeouts` inputs (see [action/README.md](action/README.md)); configure paths and exclude patterns in published `config/horizon-doctor.php`, or run `php artisan horizon:doctor --scan-jobs` in a custom step.

GitHub Action
-------------

[](#github-action)

Run the same checks in CI with the [composite action](https://docs.github.com/en/actions/creating-actions/creating-a-composite-action) published from this repository:

```
jobs:
  horizon-doctor:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: shivammathur/setup-php@v2
        with:
          php-version: "8.4"
          tools: composer:v2
      - run: composer install --no-interaction --prefer-dist
      - uses: okaufmann/laravel-horizon-doctor@v1
```

Pin a **semver tag** (for example `v1.0.0`) instead of `@v1` if you want fully reproducible builds. Full inputs, outputs, prerequisite behavior, and Marketplace notes are documented in [action/README.md](action/README.md).

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Oliver Kaufmann](https://github.com/okaufmann)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance91

Actively maintained with recent releases

Popularity28

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 77.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~72 days

Recently: every ~0 days

Total

18

Last Release

49d ago

Major Versions

v0.0.7 → v1.0.02023-01-26

v1.1.1 → v2.0.02026-03-23

PHP version history (3 changes)v0.0.1PHP ^8.1

v0.0.2PHP ^8.0

v2.0.0PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/ac14ae1d966d2e64dc0eafb28a747b95e34069e1ddeabfcd5d6709569f4e9b19?d=identicon)[okaufmann](/maintainers/okaufmann)

---

Top Contributors

[![okaufmann](https://avatars.githubusercontent.com/u/4414498?v=4)](https://github.com/okaufmann "okaufmann (78 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (12 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (8 commits)")[![stelles](https://avatars.githubusercontent.com/u/1278900?v=4)](https://github.com/stelles "stelles (3 commits)")

---

Tags

laravelOkaufmannlaravel-horizon-doctor

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/okaufmann-laravel-horizon-doctor/health.svg)

```
[![Health](https://phpackages.com/badges/okaufmann-laravel-horizon-doctor/health.svg)](https://phpackages.com/packages/okaufmann-laravel-horizon-doctor)
```

###  Alternatives

[spatie/laravel-activitylog

A very simple activity logger to monitor the users of your website or application

5.8k45.4M309](/packages/spatie-laravel-activitylog)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

3786.5k](/packages/harris21-laravel-fuse)[laragear/preload

Effortlessly make a Preload script for your Laravel application.

119363.5k](/packages/laragear-preload)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
