Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laminas Diagnostics

Laminas Diagnostics Laravel Package

laminas/laminas-diagnostics

Run health checks for your PHP/Laminas apps and environments. laminas-diagnostics provides diagnostic tests and reporting for common issues, with an extensible API for custom checks and CI-friendly output.

View on GitHub
Deep Wiki
Context7

A set of components for performing diagnostic tests in PHP applications

Frequently asked questions about Laminas Diagnostics
Can I use laminas-diagnostics in a Laravel application?
Yes. laminas-diagnostics is a framework-agnostic, PSR-compliant PHP package, so you can bind it through a Laravel service provider or call it from Artisan commands, middleware, or controllers. There is no official Laravel integration, so Laravel-specific connections and reporting usually need thin wrapper code.
How do I install laminas/laminas-diagnostics with Composer?
Run composer require laminas/laminas-diagnostics in your Laravel project. Check that your PHP version and the package's psr/log and psr/container constraints match your app. Composer will not auto-discover a Laravel service provider for this package, so register any integration manually.
Does laminas-diagnostics support Laravel 10, 11, or 12?
The package does not publish Laravel-specific version support; compatibility depends on its PHP and PSR dependency constraints. Any Laravel version that satisfies those constraints can use it, but you should test your exact Laravel and PHP combination. Treat Laravel support as an integration concern rather than an official package guarantee.
How do I create a custom diagnostic check for Laravel?
Create a class that implements the package's check interface and returns the appropriate diagnostic result objects. Register that check with the diagnostic runner, then invoke the runner from a Laravel command, job, or health controller. Inject Laravel config values or wrapped services so the check can validate your app's database, cache, or filesystem.
Can laminas-diagnostics power a Laravel health endpoint?
Yes. You can wrap the diagnostic runner in a controller or middleware and map passing or failing results to HTTP 200 or 503. Keep the endpoint lightweight by avoiding slow network and database checks on every request. For heavier checks, run diagnostics on a schedule and expose the cached status.
How do I configure laminas-diagnostics for different Laravel environments?
Use a Laravel service provider or config file to choose which diagnostic checks run in local, staging, and production. Inject environment-specific values such as database connections, Redis hosts, and disk paths instead of hard-coding them. You can also schedule different diagnostic suites via Laravel's task scheduler.
How should I test laminas-diagnostics checks in Laravel with PHPUnit or Pest?
Unit test custom checks by mocking the services they inspect, such as database connections, cache stores, or HTTP clients. Then test the runner integration to confirm pass, warning, and failure results are mapped correctly. Laravel's test container makes it easy to bind fake services without touching real infrastructure.
What production concerns should I consider before using laminas-diagnostics in Laravel?
The biggest risk is performance if you run granular checks on every request, especially checks that hit databases, caches, or remote services. Schedule heavier diagnostics and cache their results for health endpoints. Also define failure handling, such as HTTP 503 responses, logging, notifications, and retries, and verify behavior across multiple servers.
What are alternatives to laminas-diagnostics for Laravel health checks?
Laravel 11 includes a basic built-in health route, and Laravel-native packages such as Spatie Laravel Health provide framework-specific checks and dashboards. laminas-diagnostics is a better fit if you want a generic, extensible Laminas/PSR-style diagnostic runner. Compare custom check needs, output formats, and maintenance before choosing.
Is laminas-diagnostics maintained, and what changed in version 1.30.1?
laminas-diagnostics is part of the Laminas ecosystem, which is generally less active than Laravel-first packages, so monitor releases and PHP/PSR constraint changes. Version 1.30.1 is a patch release with an internal data versioning fix and no new dependencies or breaking changes. If your Laravel integration caches or serializes versioned diagnostic output, verify that path after upgrading.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin