beyondcode/laravel-self-diagnosis
Run a series of checks to verify your server meets Laravel's requirements. This package provides an artisan command and web interface to diagnose PHP version, extensions, folder permissions, and other environment issues before deployment. Catch problems early and ship with confidence.
Architecture fit. beyondcode/laravel-self-diagnosis is an opt-in verification utility, not an architectural component. The service provider registers an Artisan command and (by default) an HTTP route that renders pass/fail output for a configurable check list — PHP version, required extensions, writable paths, .env presence, app key, storage symlink, database connectivity. It brings no migrations, no persistence, no queue or event coupling, and nothing on the request path. From a TPM's seat that is the ideal shape for a peripheral dependency: outside the domain model, incapable of entangling itself in business logic, and removable in an afternoon (one provider registration, one published config file). Plan it as a pre-flight readiness utility — a checklist you can execute — not as observability, monitoring, or a health endpoint with an SLA behind it.
Integration feasibility. Composer install with package auto-discovery, a publishable config, and an extensible check list (custom checks are plain classes or closures). The work is an afternoon, not a sprint: install, publish config, select the checks that are meaningful for our environments, add domain-specific custom checks where preconditions exist, gate the route, wire the command into a post-deploy smoke step. No data migration, no API surface to design, no cross-team contract to negotiate. The only genuine coordination cost is the access-control decision — and that is a decision, not engineering effort.
Technical risk. Low on runtime, moderate on supply chain, and one real product risk.
composer.json constraints. Verify the runtime constraint admits ^13.0, not merely that CI tested against it — the silent-downgrade trap is the realistic failure mode during composer update. The second PR in the release is labeled only "Dev by @mechelon," opaque enough that a check, middleware, or config change could be hiding behind a maintenance-sounding title. Not a blocker for a minor bump; a reason to read the diff.Key questions.
composer.json widen illuminate/* / laravel/framework to admit ^13.0, or is compatibility asserted without a constraint change?local?Stack fit. Any Laravel application on a supported major; 3.1.0 extends the tested matrix through Laravel 13.x. No overlap with application dependencies beyond the framework itself, so dependency-graph conflict risk is negligible. Read the PHP floor off the resolved Laravel 13 requirement rather than inferring it from the changelog or CI matrix. Note the opportunity: 14.75 sub-score: this is a narrow, single-purpose tool with no expansion surface — which is exactly the point, and why it should be scoped as a bounded utility rather than a platform bet.
Migration path. From 3.0.0 this is a composer update plus a re-run of php artisan diagnose. No migrations, no asset publishing, no contract changes implied. If the config was already published, diff config/self-diagnosis.php against the vendor copy afterward — Laravel's merged config applies new keys silently, convenient but capable of hiding a changed default. For a first adoption the path is the same shape: install, publish, customize, gate, wire into pipeline.
Compatibility. Pin to tag 3.1.0, never a branch. Confirm the resolved composer.json constraints against our actual PHP/Laravel pairing before merge — the realistic failure mode is a silent downgrade to an older tag during composer update, which looks like success. Verify the SAPI that matters: a green CLI run does not guarantee a green FPM run.
Sequencing. Four phases, each independently valuable:
php artisan diagnose to the post-deploy smoke step and to the release checklist as a named go/no-go artifact. This is the step that converts an installed dependency into realized value; installed-but-never-executed is the standard failure mode of this adoption.Maintenance. Low and well-bounded. Upkeep appears driven largely by automated compatibility PRs, which is a positive signal for framework currency and a neutral signal for depth of maintenance. Budget a recurring line item: read the diff on minor bumps rather than trusting release notes, and re-diff the published config after each bump. Plan the exit rather than assuming a patch lands the day a future Laravel major ships — removal is one provider registration plus one config file, which is the right risk posture for a non-critical-path dependency.
Support. This is the strongest operational lever. A meaningful share of Laravel support load is misconfiguration rather than code defects: stale config cache, non-writable storage/, wrong app key, missing storage symlink, unreachable database. One diagnostic surface shortens "the app is broken" into "we know which subsystem is failing," and lets support agents run the check before escalating to engineering. Instrument it — tickets deflected, time-to-triage, first-response resolution rate — so the value is measured rather than asserted. For self-hosted or on-prem installs, an authenticated "run diagnostics" page is a product feature we would otherwise scope, design, and maintain; here it is an integration task.
Scaling. No scaling surface of its own: no background jobs, no storage, no per-request cost. The only scaling consideration is organizational — the check list is shared configuration, so once multiple teams rely on it, changes need a review path. Treat the published config as owned code, not as a local convenience. If the diagnostic page is customer-facing for self-hosted installs, add load expectations for the page itself (it runs live checks including database connectivity) and confirm check timeouts are bounded.
Failure modes. Enumerate them in the runbook, because each has a different response:
composer update resolves an older tag; mitigate by pinning and asserting the resolved version in CI.Ramp-up. Essentially zero for engineers who already know Laravel: a command they have run before and a page they can read. Onboarding is the secondary use case — a new engineer runs diagnostics to learn an environment's expected state instead of asking a senior. The ramp-up cost that does exist is policy, not skill: whoever owns the route's access control must decide and document it before the first non-local deployment. Assign that owner at kickoff, record the gating decision in the runbook, and treat "diagnostics green" as a named artifact in release reviews so the checklist has a paper trail rather than a memory.
How can I help you explore Laravel packages today?