Download the PHP package webqamdev/laravel-self-diagnosis without Composer
On this page you can find all versions of the php package webqamdev/laravel-self-diagnosis. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download webqamdev/laravel-self-diagnosis
More information about webqamdev/laravel-self-diagnosis
Files in webqamdev/laravel-self-diagnosis
Package laravel-self-diagnosis
Short Description Perform various self diagnosis tests on your Laravel application.
License MIT
Homepage https://github.com/webqamdev/laravel-self-diagnosis
Informations about the package laravel-self-diagnosis
Perform Self-Diagnosis Tests On Your Laravel Application
This package allows you to run self-diagnosis tests on your Laravel application. It comes with multiple checks out of the box and allows you to add custom checks yourself.
Here is an example output of the command:
Included checks
- Is the APP_KEY set?
- Are your composer dependencies up to date with the composer.lock file?
- Do you have the correct PHP version installed?
- Do you have the correct PHP extensions installed?
- Can a connection to the database be established?
- Do the
storage
andbootstrap/cache
directories have the correct permissions? - Does the
.env
file exist? - Is the maintenance mode disabled?
- Are the required locales installed on the system?
- Are there environment variables that exist in
.env.example
but not in.env
? - Are there any migrations that need to be run?
- Is the storage directory linked?
- Can Redis be accessed?
Development environment checks
- Is the configuration not cached?
- Are the routes not cached?
- Are there environment variables that exist in
.env
but not in.env.example
?
Production environment checks
- Is the configuration cached?
- Are the routes cached?
- Is the xdebug PHP extension disabled?
- Is APP_DEBUG set to false?
- Are certain servers reachable?
- Are certain supervisor programs running?
Installation
You can install the package via composer:
If you're using Laravel 5.5+ the SelfDiagnosisServiceProvider
will be automatically registered for you.
Usage
Just call the artisan command to start the checks:
Customization
You can publish the configuration file, that contains all available checks using:
This will publish a self-diagnosis.php
file in your config
folder. This file contains all the checks that will be performed on your application.
Available Configuration Options
The following options are available for the individual checks:
BeyondCode\SelfDiagnosis\Checks\ComposerWithDevDependenciesIsUpToDate
- additional_options (string, optional parameters like
'--ignore-platform-reqs'
): optional arguments for composer
- additional_options (string, optional parameters like
BeyondCode\SelfDiagnosis\Checks\ComposerWithoutDevDependenciesIsUpToDate
- additional_options (string, optional parameters like
'--ignore-platform-reqs'
): optional arguments for composer
- additional_options (string, optional parameters like
BeyondCode\SelfDiagnosis\Checks\DatabaseCanBeAccessed
- default_connection (boolean, default:
true
): if the default connection should be checked - connections (array, list of connection names like
['mysql', 'sqlsrv']
, default:[]
): additional connections to check
- default_connection (boolean, default:
BeyondCode\SelfDiagnosis\Checks\DirectoriesHaveCorrectPermissions
- directories (array, list of directory paths like
[storage_path(), base_path('bootstrap/cache')]
, default:[]
): directories to check
- directories (array, list of directory paths like
BeyondCode\SelfDiagnosis\Checks\LocalesAreInstalled
- required_locales (array, list of locales like
['en_US', 'en_US.utf8']
, default:[]
): locales to check
- required_locales (array, list of locales like
BeyondCode\SelfDiagnosis\Checks\PhpExtensionsAreDisabled
- extensions (array, list of extension names like
['xdebug', 'zlib']
, default:[]
): extensions to check
- extensions (array, list of extension names like
BeyondCode\SelfDiagnosis\Checks\PhpExtensionsAreInstalled
- extensions (array, list of extension names like
['openssl', 'PDO']
, default:[]
): extensions to check - include_composer_extensions (boolean, default:
false
): if required extensions defined incomposer.json
should be checked
- extensions (array, list of extension names like
BeyondCode\SelfDiagnosis\Checks\RedisCanBeAccessed
- default_connection (boolean, default:
true
): if the default connection should be checked - connections (array, list of connection names like
['cache_1', 'cache_2']
, default:[]
): additional connections to check
- default_connection (boolean, default:
BeyondCode\SelfDiagnosis\Checks\SupervisorProgramsAreRunning
- programs (array, list of programs like
['horizon', 'another-program']
, default:[]
): programs that are required to be running - restarted_within (integer, max allowed seconds since last restart of programs (
0
= disabled), default:0
): verifies that programs have been restarted recently to grab code updates
- programs (array, list of programs like
BeyondCode\SelfDiagnosis\Checks\ServersArePingable
- servers (array, list of servers and parameters like
['google.com', ['host' => 'google.com', 'port' => 8080]]
): servers to ping
- servers (array, list of servers and parameters like
Custom Checks
You can create custom checks, by implementing the BeyondCode\SelfDiagnosis\Checks\Check
interface and adding the class to the config file.
Like this:
Example Output
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Marcel Pociot
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-self-diagnosis with dependencies
composer/semver Version ^1.4|^3.0
geerlingguy/ping Version ^1.1
illuminate/support Version 5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|^6.0|^7.0|^8.0|^9.0|^10.0
vlucas/phpdotenv Version ~2.5|~3.3|^4.0|^5.0