Improve Doctor diagnostics and update dashboard dependencies
Contribution type
- Bug fix
Problem and change
Doctor could report a healthy application when its default mailer was misspelled, a log stack contained a blank channel, or its database connection did not exist. It now identifies the setting or connection that needs attention. This PR also updates the dependencies used by Horizon, Telescope, and the exception renderer.
The configuration check follows the selected broadcaster, log channel, and mailer. It reports missing drivers and required settings throughout nested log stacks and composite mailers. A bad member no longer hides missing credentials on a sibling. Custom driver names, mail URLs, and disabled sessions keep their existing behavior.
For storage, Doctor inspects the disk the application uses. A disk registered with Storage::set() takes precedence over its configuration record. Doctor checks a local root without creating it. A manually registered local adapter can check its own directory even if it was constructed without root metadata. Undefined disk and database names, and queue connections missing a driver, each produce a specific message.
The Redis checks send PING and read the server's rejection on the same pooled connection. An invalid cache, queue, or session setting identifies the configuration key and leaves the other active connections available to check. The terminal displays error details as literal text.
The Redis Cluster transport test now trusts its fixture CA for the duration of the test. This lets the empty-context case exercise the client’s normal certificate verification in CI.
Dashboard dependencies
Horizon now uses Chart.js 4's line chart and scale APIs. The metrics charts retain their runtime units, timestamp spacing, tooltips, and vertical headroom. Horizon and Telescope use Vue Router 5 with their existing routes. The exception renderer uses Shiki 4.6 and loads the grammars and themes it needs. The rebuilt Horizon, Telescope, and exception renderer bundles are included for Composer installations.
Supporting evidence
testMalformedDataConnectionDoesNotHideARejectedLockConnection— With an invalid cache data connection and a separate lock connection whose server rejects PING, the previous check stopped at the first setting. The regression test now receives both the configuration key and the server's response.testChecksTheRootOfTheRegisteredDiskWhenItReplacesAConfiguredDisk— When an application registered a local disk over a configured disk, Doctor checked the old root. The regression test verifies the active root is reported and that the check leaves the missing directory absent.testClusterSchemeSelectsTheExpectedTransport— The Redis Cluster transport test failed in CI when the client could not verify the fixture certificate. Its test-scoped trust store now contains the issuing CA. The same CI image passes the empty-context TLS case with certificate verification enabled.
Verification
PHP CS Fixer, composer analyse, and the Doctor, Redis Cluster connection, and filesystem PHPUnit suites passed locally. The frontend passed pnpm check, pnpm test, pnpm run test:wayfinder:cached, and pnpm run typecheck:wayfinder. Two pnpm build runs after pnpm install --frozen-lockfile produced identical bundles. Chromium checks covered chart labels and tooltips, dashboard routing under a path prefix, and syntax highlighting in both themes.
Before submitting
- Reviewed the complete diff and verified the behavior described above.
- Included regression coverage and updated the Doctor documentation.
- Ran the local checks listed above and verified the final CI results.
The PHP suites were targeted locally. The full framework suite passed in CI on PHP 8.4 and 8.5.
Summary by cubic
Doctor previously reported a healthy application when the default mailer was misspelled, a log stack contained a blank channel, or the default database connection didn't exist. It now fails with the specific setting or connection that needs attention, and it updates the JavaScript dependencies for Horizon, Telescope, and the exception renderer.
Diagnostics
- Undefined default database connections fail with a
DB_CONNECTIONfix suggestion; driverless filesystem disks get aFILESYSTEM_DISKone. - Filesystem disks registered with
Storage::set()are probed without requiring a config record; registered local disks without root metadata are checked against the resolved adapter's root. - Nested log stacks and composite mailers are traversed, so one bad member can't hide missing credentials on another.
- Redis PING failures report the server's reason, captured on the same pooled connection; malformed Redis selectors are reported without blocking checks of the valid ones.
- Diagnostic details render as literal terminal text, stripped of escape sequences.
Frontend
- Horizon moves to Chart.js 4's line charts; metrics keep their timestamp spacing, runtime units, and headroom.
- Horizon and Telescope move to Vue Router 5, and the exception renderer moves Shiki to 4.6.
- Dashboard and exception renderer bundles are rebuilt; a second build produced identical output.
[!NOTE]
Harden Doctor diagnostics and add RedisConnections support class
- New
RedisConnections helper collects active Redis connection selectors, resolves them with per-key failure reporting, and provides ensureReachable PING checks. Queue and session diagnostics now use it instead of inline Redis facade probes
RequiredConfigurationValuesAreSet rewritten with per-service checks (broadcasting, filesystem, logging, queue, mailer). It now validates log stacks recursively, validates failover/round-robin child mailers including cycles, checks cache.default, database.default, and conditionally session.driver
DatabaseConnectionIsReachable and FilesystemDisksAreReachable now fail with remediation guidance and doc links instead of skipping when the default connection or disk driver is missing
CliRenderer strips terminal control bytes from detail output and escapes markup; verbose details indent continuation lines
ActiveDrivers fixes: null cache/queue drivers no longer pick up same-named Redis config, and mailer discovery requires an explicit transport
- Horizon upgraded to Chart.js 4.5 (
LineChart reconfigured for the new plugin/scale API) and dashboard deps updated (vue-router to ^5.4.0, Shiki to ^4.6.0)
- Behavioral Change: previously skipped diagnostics (missing DB default, missing disk driver, missing queue driver) now fail.
RequiredConfigurationValuesAreSet no longer defaults a driver to its connection name, so configs relying on that convention will be reported as missing
Macroscope summarized 973c7fb.
Summary by CodeRabbit
- Bug Fixes
- Health checks now flag undefined database connections and disks, while still recognizing disks registered at runtime.
- Configuration checks catch missing or invalid settings across logging, mail, queues, sessions, storage, and broadcasting.
- Redis health checks report server errors more clearly and use the selected connection for checks.
- Improvements
- Metrics charts display time values in seconds, start their y-axis at zero, and show fewer x-axis labels for easier reading.