wizcodepl / outdated-packages-health-check
This package contains a Laravel Health check that can report any outdated PHP packages installed in your application using Composer.
Package info
github.com/wizcodepl/outdated-packages-health-check
pkg:composer/wizcodepl/outdated-packages-health-check
Fund package maintenance!
Requires
- php: ^8.0
- illuminate/contracts: ^10.0||^11.0||^12.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^2.9||^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^10.0.0||^9.0.0||^8.22.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/extension-installer: ^1.3||^2.0
- phpstan/phpstan-deprecation-rules: ^1.1||^2.0
- phpstan/phpstan-phpunit: ^1.3||^2.0
- spatie/laravel-health: ^1.22.0
- spatie/laravel-ray: ^1.35
This package is auto-updated.
Last update: 2026-05-06 11:14:09 UTC
README
This package contains a Laravel Health check that can report any outdated PHP packages installed in your application using Composer.
This package contains a Laravel Health check that can report any outdated PHP packages installed in your application using Composer.
About us
Wizcode builds expandable MVPs with lightning-speed development solutions. We create scalable web platforms, mobile apps, and IoT solutions. Check for more: https://wizcode.pl
Installation
You can install the package via composer:
composer require wizcodepl/outdated-packages-health-check
Usage
use Spatie\Health\Facades\Health; use WizcodePl\OutdatedPackagesHealthCheck\OutdatedPackagesCheck; Health::checks([ OutdatedPackagesCheck::new() ->direct() ->includeDev() ->composerPath('/path/to/composer'), ]);
By default the check warns when ANY package has a newer release (patch / minor / major). On a busy app this is noisy — every patch bump turns the dashboard yellow. To get signal on only the bumps that matter to you, restrict alert levels:
// Alert only on major bumps (1.x.x → 2.0.0). Patch and minor still appear in `meta`, // but they don't drive the check status. OutdatedPackagesCheck::new()->onlyMajor(); // Alert on minor and major (e.g. 1.2.x → 1.3.0 or 2.0.0). OutdatedPackagesCheck::new()->minorAndAbove(); // Or pick the exact set yourself: OutdatedPackagesCheck::new()->alertOnLevels([ OutdatedPackagesCheck::LEVEL_MAJOR, OutdatedPackagesCheck::LEVEL_MINOR, ]);
Versions that can't be parsed as MAJOR.MINOR.PATCH (e.g. dev-main, prerelease tags with the same numeric core) are bucketed as LEVEL_UNKNOWN and are alerted alongside LEVEL_MAJOR by onlyMajor() and minorAndAbove() — better to alarm wrongly than to silently miss a real upgrade.
The result's meta always contains the full picture, so dashboards can show what's outdated regardless of alerting:
[
'outdated_total' => 7,
'outdated_by_level' => ['major' => 1, 'minor' => 2, 'patch' => 4, 'unknown' => 0],
'alert_levels' => ['major', 'unknown'],
'alerting_packages' => [
['name' => 'vendor/x', 'version' => '1.2.3', 'latest' => '2.0.0', 'level' => 'major'],
],
]
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.