diff --git a/README.md b/README.md index 8d480ed..383977e 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ Here is an example output of the command: - Are there any migrations that need to be run? - Is the storage directory linked? - Can Redis be accessed? +- Is a CACHE_PREFIX set? ### Development environment checks @@ -89,6 +90,7 @@ return [ */ 'checks' => [ \BeyondCode\SelfDiagnosis\Checks\AppKeyIsSet::class, + \BeyondCode\SelfDiagnosis\Checks\CachePrefixIsSet::class, \BeyondCode\SelfDiagnosis\Checks\CorrectPhpVersionIsInstalled::class, \BeyondCode\SelfDiagnosis\Checks\DatabaseCanBeAccessed::class => [ 'default_connection' => true, diff --git a/config/config.php b/config/config.php index e029bf6..a075c20 100644 --- a/config/config.php +++ b/config/config.php @@ -16,6 +16,7 @@ */ 'checks' => [ \BeyondCode\SelfDiagnosis\Checks\AppKeyIsSet::class, + \BeyondCode\SelfDiagnosis\Checks\CachePrefixIsSet::class, \BeyondCode\SelfDiagnosis\Checks\CorrectPhpVersionIsInstalled::class, \BeyondCode\SelfDiagnosis\Checks\DatabaseCanBeAccessed::class => [ 'default_connection' => true, diff --git a/src/Checks/CachePrefixIsSet.php b/src/Checks/CachePrefixIsSet.php new file mode 100644 index 0000000..e0f8ee9 --- /dev/null +++ b/src/Checks/CachePrefixIsSet.php @@ -0,0 +1,49 @@ +safeLoad(); + + return in_array('CACHE_PREFIX', $env->getEnvironmentVariableNames()); + } + + /** + * The error message to display in case the check does not pass. + * + * @param array $config + * @return string + */ + public function message(array $config): string + { + return trans('self-diagnosis::checks.cache_prefix_is_set.message'); + } +} diff --git a/tests/CachePrefixIsSetTest.php b/tests/CachePrefixIsSetTest.php new file mode 100644 index 0000000..e5b9f64 --- /dev/null +++ b/tests/CachePrefixIsSetTest.php @@ -0,0 +1,28 @@ +app->setBasePath(__DIR__ . '/fixtures'); + + $check = new CachePrefixIsSet(); + + $this->assertFalse($check->check([])); + $this->assertSame('A missing cache prefix could cause problems in shared hosting environments due to shared cache key access. Set a custom "CACHE_PREFIX" in your .env file.', $check->message([])); + } +} diff --git a/translations/de/checks.php b/translations/de/checks.php index 4b6be7e..dd88a53 100644 --- a/translations/de/checks.php +++ b/translations/de/checks.php @@ -1,109 +1,113 @@ - [ - 'message' => 'Der Anwendungsschlüssel ist nicht gesetzt. Nutze "php artisan key:generate", um einen zu erstellen und zu setzen.', - 'name' => 'Anwendungsschlüssel ist gesetzt', - ], - 'composer_with_dev_dependencies_is_up_to_date' => [ - 'message' => 'Die Composer Abhängigkeiten sind nicht aktuell. Nutze "composer install", um diese zu aktualisieren. :more', - 'name' => 'Composer Abhängigkeiten (inkl. dev) sind aktuell', - ], - 'composer_without_dev_dependencies_is_up_to_date' => [ - 'message' => 'Die Composer Abhängigkeiten sind nicht aktuell. Nutze "composer install", um diese zu aktualisieren. :more', - 'name' => 'Composer Abhängigkeiten (ohne dev) sind aktuell', - ], - 'configuration_is_cached' => [ - 'message' => 'Die Konfiguration sollte für bessere Performance gecached sein im Produktivbetrieb. Nutze "php artisan config:cache", um den Konfigurations-Cache zu erstellen.', - 'name' => 'Konfiguration ist gecached', - ], - 'configuration_is_not_cached' => [ - 'message' => 'Die Konfiguration sollte während der Entwicklung nicht gecached sein. Nutze "php artisan config:clear", um den Konfigurations-Cache zu leeren.', - 'name' => 'Konfiguration ist nicht gecached', - ], - 'correct_php_version_is_installed' => [ - 'message' => 'Die benötigte PHP Version ist nicht installiert.' . PHP_EOL . 'Benötigt: :required' . PHP_EOL . 'In Verwendung: :used', - 'name' => 'Die richtige PHP Version ist installiert', - ], - 'database_can_be_accessed' => [ - 'message' => 'Auf die Datenbank kann nicht zugegriffen werden: :error', - 'name' => 'Die Datenbank ist erreichbar', - ], - 'debug_mode_is_not_enabled' => [ - 'message' => 'Der Debugging-Modus sollte im Produktivbetrieb nicht genutzt werden. Setze "APP_DEBUG" in der .env Datei auf "false".', - 'name' => 'Der Debugging-Modus ist deaktiviert', - ], - 'directories_have_correct_permissions' => [ - 'message' => 'Folgende Verzeichnisse sind nicht beschreibbar:' . PHP_EOL .':directories', - 'name' => 'Alle Verzeichnisse haben die richtigen Berechtigungen', - ], - 'env_file_exists' => [ - 'message' => 'Die .env Datei existiert nicht. Bitte kopiere die Datei .env.example zu .env und passe diese entsprechend an.', - 'name' => 'Die Umgebungsvariablendatei existiert', - ], - 'example_environment_variables_are_set' => [ - 'message' => 'Folgende Umgebungsvariablen fehlen im .env Umgebungsfile, sind aber in .env.example definiert:' . PHP_EOL . ':variables', - 'name' => 'Die Beispiel-Umgebungsvariablen sind gesetzt', - ], - 'locales_are_installed' => [ - 'message' => [ - 'cannot_run_on_windows' => 'Dieser Check kann unter Windows nicht ausgeführt werden..', - 'locale_command_not_available' => 'Der Befehl "locale -a" ist auf dem aktuellen System nicht verfügbar.', - 'missing_locales' => 'Folgende Sprachumgebungen (locales) fehlen:' . PHP_EOL . ':locales', - 'shell_exec_not_available' => 'Die Funktion "shell_exec" ist entweder nicht definiert oder deaktiviert, daher können die Sprachumgebungen nicht abgefragt werden.', - ], - 'name' => 'Benötigte Sprachumgebungen sind installiert', - ], - 'maintenance_mode_not_enabled' => [ - 'message' => 'Der Wartungsmodus ist noch aktiv. Deaktiviere ihn mit "php artisan up".', - 'name' => 'Wartungsmodus ist nicht aktiv', - ], - 'migrations_are_up_to_date' => [ - 'message' => [ - 'need_to_migrate' => 'Die Datenbank muss aktualisiert werden. Nutze "php artisan migrate", um die Migrationen einzuspielen.', - 'unable_to_check' => 'Die Migrationen konnten nicht geprüft werden: :reason', - ], - 'name' => 'Die Migrationen sind aktuell', - ], - 'php_extensions_are_disabled' => [ - 'message' => 'Die folgenden Erweiterungen sind noch immer aktiviert:' . PHP_EOL . ':extensions', - 'name' => 'Unerwünschte PHP Erweiterungen sind deaktiviert', - ], - 'php_extensions_are_installed' => [ - 'message' => 'Die folgenden Erweiterungen fehlen:' . PHP_EOL . ':extensions', - 'name' => 'Die benötigten PHP Erweiterungen sind installiert', - ], - 'redis_can_be_accessed' => [ - 'message' => [ - 'not_accessible' => 'Auf den Redis Cache kann nicht zugegriffen werden: :error', - 'default_cache' => 'Der Standard-Cache ist nicht erreichbar.', - 'named_cache' => 'Der Cache :name ist nicht erreichbar.', - ], - 'name' => 'Der Redis Cache ist erreichbar', - ], - 'routes_are_cached' => [ - 'message' => 'Die Routen sollten für bessere Performance gecached sein im Produktivbetrieb. Nutze "php artisan route:cache", um den Routen-Cache zu erstellen.', - 'name' => 'Routen sind gecached', - ], - 'routes_are_not_cached' => [ - 'message' => 'Die Routen sollten während der Entwicklung nicht gecached sein. Nutze "php artisan route:clear", um den Routen-Cache zu leeren.', - 'name' => 'Routen sind nicht gecached', - ], - 'servers_are_pingable' => [ - 'message' => "Der Server ':host' (Port: :port) ist nicht erreichbar (Timeout nach :timeout Sekunden).", - 'name' => 'Benötigte Server sind pingbar', - ], - 'storage_directory_is_linked' => [ - 'message' => 'Das Speicherverzeichnis ist nicht verlinkt. Nutze "php artisan storage:link", um eine symbolische Verknüpfung zu erstellen.', - 'name' => 'Das Speicherverzeichnis ist verlinkt', - ], - 'supervisor_programs_are_running' => [ - 'message' => [ - 'cannot_run_on_windows' => 'Dieser Check kann unter Windows nicht ausgeführt werden..', - 'not_running_programs' => 'Die folgenden Programme laufen nicht oder benötigen einen Neustart:' . PHP_EOL . ':programs', - 'shell_exec_not_available' => 'Die Funktion "shell_exec" ist entweder nicht definiert oder deaktiviert, daher können die laufenden Programme nicht abgefragt werden.', - 'supervisor_command_not_available' => 'Der Befehl "supervisorctl" ist auf dem aktuellen System nicht verfügbar.', - ], - 'name' => 'Alle supervisor Programme sind in Betrieb', - ], -]; + [ + 'message' => 'Der Anwendungsschlüssel ist nicht gesetzt. Nutze "php artisan key:generate", um einen zu erstellen und zu setzen.', + 'name' => 'Anwendungsschlüssel ist gesetzt', + ], + 'cache_prefix_is_set' => [ + 'message' => 'Ein fehlendes Cache-Prefix könnte in Shared-Hosting-Umgebungen Probleme verursachen wegen parallelem Zugriff auf Cache-Schlüssel. Setze ein eigenes "CACHE_PREFIX" in der .env Datei.', + 'name' => 'Cache prefix ist gesetzt' + ], + 'composer_with_dev_dependencies_is_up_to_date' => [ + 'message' => 'Die Composer Abhängigkeiten sind nicht aktuell. Nutze "composer install", um diese zu aktualisieren. :more', + 'name' => 'Composer Abhängigkeiten (inkl. dev) sind aktuell', + ], + 'composer_without_dev_dependencies_is_up_to_date' => [ + 'message' => 'Die Composer Abhängigkeiten sind nicht aktuell. Nutze "composer install", um diese zu aktualisieren. :more', + 'name' => 'Composer Abhängigkeiten (ohne dev) sind aktuell', + ], + 'configuration_is_cached' => [ + 'message' => 'Die Konfiguration sollte für bessere Performance gecached sein im Produktivbetrieb. Nutze "php artisan config:cache", um den Konfigurations-Cache zu erstellen.', + 'name' => 'Konfiguration ist gecached', + ], + 'configuration_is_not_cached' => [ + 'message' => 'Die Konfiguration sollte während der Entwicklung nicht gecached sein. Nutze "php artisan config:clear", um den Konfigurations-Cache zu leeren.', + 'name' => 'Konfiguration ist nicht gecached', + ], + 'correct_php_version_is_installed' => [ + 'message' => 'Die benötigte PHP Version ist nicht installiert.' . PHP_EOL . 'Benötigt: :required' . PHP_EOL . 'In Verwendung: :used', + 'name' => 'Die richtige PHP Version ist installiert', + ], + 'database_can_be_accessed' => [ + 'message' => 'Auf die Datenbank kann nicht zugegriffen werden: :error', + 'name' => 'Die Datenbank ist erreichbar', + ], + 'debug_mode_is_not_enabled' => [ + 'message' => 'Der Debugging-Modus sollte im Produktivbetrieb nicht genutzt werden. Setze "APP_DEBUG" in der .env Datei auf "false".', + 'name' => 'Der Debugging-Modus ist deaktiviert', + ], + 'directories_have_correct_permissions' => [ + 'message' => 'Folgende Verzeichnisse sind nicht beschreibbar:' . PHP_EOL .':directories', + 'name' => 'Alle Verzeichnisse haben die richtigen Berechtigungen', + ], + 'env_file_exists' => [ + 'message' => 'Die .env Datei existiert nicht. Bitte kopiere die Datei .env.example zu .env und passe diese entsprechend an.', + 'name' => 'Die Umgebungsvariablendatei existiert', + ], + 'example_environment_variables_are_set' => [ + 'message' => 'Folgende Umgebungsvariablen fehlen im .env Umgebungsfile, sind aber in .env.example definiert:' . PHP_EOL . ':variables', + 'name' => 'Die Beispiel-Umgebungsvariablen sind gesetzt', + ], + 'locales_are_installed' => [ + 'message' => [ + 'cannot_run_on_windows' => 'Dieser Check kann unter Windows nicht ausgeführt werden..', + 'locale_command_not_available' => 'Der Befehl "locale -a" ist auf dem aktuellen System nicht verfügbar.', + 'missing_locales' => 'Folgende Sprachumgebungen (locales) fehlen:' . PHP_EOL . ':locales', + 'shell_exec_not_available' => 'Die Funktion "shell_exec" ist entweder nicht definiert oder deaktiviert, daher können die Sprachumgebungen nicht abgefragt werden.', + ], + 'name' => 'Benötigte Sprachumgebungen sind installiert', + ], + 'maintenance_mode_not_enabled' => [ + 'message' => 'Der Wartungsmodus ist noch aktiv. Deaktiviere ihn mit "php artisan up".', + 'name' => 'Wartungsmodus ist nicht aktiv', + ], + 'migrations_are_up_to_date' => [ + 'message' => [ + 'need_to_migrate' => 'Die Datenbank muss aktualisiert werden. Nutze "php artisan migrate", um die Migrationen einzuspielen.', + 'unable_to_check' => 'Die Migrationen konnten nicht geprüft werden: :reason', + ], + 'name' => 'Die Migrationen sind aktuell', + ], + 'php_extensions_are_disabled' => [ + 'message' => 'Die folgenden Erweiterungen sind noch immer aktiviert:' . PHP_EOL . ':extensions', + 'name' => 'Unerwünschte PHP Erweiterungen sind deaktiviert', + ], + 'php_extensions_are_installed' => [ + 'message' => 'Die folgenden Erweiterungen fehlen:' . PHP_EOL . ':extensions', + 'name' => 'Die benötigten PHP Erweiterungen sind installiert', + ], + 'redis_can_be_accessed' => [ + 'message' => [ + 'not_accessible' => 'Auf den Redis Cache kann nicht zugegriffen werden: :error', + 'default_cache' => 'Der Standard-Cache ist nicht erreichbar.', + 'named_cache' => 'Der Cache :name ist nicht erreichbar.', + ], + 'name' => 'Der Redis Cache ist erreichbar', + ], + 'routes_are_cached' => [ + 'message' => 'Die Routen sollten für bessere Performance gecached sein im Produktivbetrieb. Nutze "php artisan route:cache", um den Routen-Cache zu erstellen.', + 'name' => 'Routen sind gecached', + ], + 'routes_are_not_cached' => [ + 'message' => 'Die Routen sollten während der Entwicklung nicht gecached sein. Nutze "php artisan route:clear", um den Routen-Cache zu leeren.', + 'name' => 'Routen sind nicht gecached', + ], + 'servers_are_pingable' => [ + 'message' => "Der Server ':host' (Port: :port) ist nicht erreichbar (Timeout nach :timeout Sekunden).", + 'name' => 'Benötigte Server sind pingbar', + ], + 'storage_directory_is_linked' => [ + 'message' => 'Das Speicherverzeichnis ist nicht verlinkt. Nutze "php artisan storage:link", um eine symbolische Verknüpfung zu erstellen.', + 'name' => 'Das Speicherverzeichnis ist verlinkt', + ], + 'supervisor_programs_are_running' => [ + 'message' => [ + 'cannot_run_on_windows' => 'Dieser Check kann unter Windows nicht ausgeführt werden..', + 'not_running_programs' => 'Die folgenden Programme laufen nicht oder benötigen einen Neustart:' . PHP_EOL . ':programs', + 'shell_exec_not_available' => 'Die Funktion "shell_exec" ist entweder nicht definiert oder deaktiviert, daher können die laufenden Programme nicht abgefragt werden.', + 'supervisor_command_not_available' => 'Der Befehl "supervisorctl" ist auf dem aktuellen System nicht verfügbar.', + ], + 'name' => 'Alle supervisor Programme sind in Betrieb', + ], +]; diff --git a/translations/en/checks.php b/translations/en/checks.php index 2915a13..35cc26f 100644 --- a/translations/en/checks.php +++ b/translations/en/checks.php @@ -1,113 +1,117 @@ - [ - 'message' => 'The application key is not set. Call "php artisan key:generate" to create and set one.', - 'name' => 'App key is set', - ], - 'composer_with_dev_dependencies_is_up_to_date' => [ - 'message' => 'Your composer dependencies are not up to date. Call "composer install" to update them. :more', - 'name' => 'Composer dependencies (including dev) are up to date', - ], - 'composer_without_dev_dependencies_is_up_to_date' => [ - 'message' => 'Your composer dependencies are not up to date. Call "composer install" to update them. :more', - 'name' => 'Composer dependencies (without dev) are up to date', - ], - 'configuration_is_cached' => [ - 'message' => 'Your configuration should be cached in production for better performance. Call "php artisan config:cache" to create the configuration cache.', - 'name' => 'Configuration is cached', - ], - 'configuration_is_not_cached' => [ - 'message' => 'Your configuration files should not be cached during development. Call "php artisan config:clear" to clear the configuration cache.', - 'name' => 'Configuration is not cached', - ], - 'correct_php_version_is_installed' => [ - 'message' => 'You do not have the required PHP version installed.' . PHP_EOL . 'Required: :required' . PHP_EOL . 'Used: :used', - 'name' => 'The correct PHP version is installed', - ], - 'database_can_be_accessed' => [ - 'message' => 'The database can not be accessed: :error', - 'name' => 'The database can be accessed', - ], - 'debug_mode_is_not_enabled' => [ - 'message' => 'You should not use debug mode in production. Set "APP_DEBUG" in the .env file to "false".', - 'name' => 'Debug mode is not enabled', - ], - 'directories_have_correct_permissions' => [ - 'message' => 'The following directories are not writable:' . PHP_EOL .':directories', - 'name' => 'All directories have the correct permissions', - ], - 'env_file_exists' => [ - 'message' => 'The .env file does not exist. Please copy your .env.example file as .env and adjust accordingly.', - 'name' => 'The environment file exists', - ], - 'example_environment_variables_are_set' => [ - 'message' => 'These environment variables are missing in your .env file, but are defined in your .env.example:' . PHP_EOL . ':variables', - 'name' => 'The example environment variables are set', - ], - 'example_environment_variables_are_up_to_date' => [ - 'message' => 'These environment variables are defined in your .env file, but are missing in your .env.example:' . PHP_EOL . ':variables', - 'name' => 'The example environment variables are up-to-date', - ], - 'locales_are_installed' => [ - 'message' => [ - 'cannot_run_on_windows' => 'This check cannot be run on Windows.', - 'locale_command_not_available' => 'The "locale -a" command is not available on the current OS.', - 'missing_locales' => 'The following locales are missing:' . PHP_EOL . ':locales', - 'shell_exec_not_available' => 'The function "shell_exec" is not defined or disabled, so we cannot check the locales.', - ], - 'name' => 'Required locales are installed', - ], - 'maintenance_mode_not_enabled' => [ - 'message' => 'Maintenance mode is still enabled. Disable it with "php artisan up".', - 'name' => 'Maintenance mode is not enabled', - ], - 'migrations_are_up_to_date' => [ - 'message' => [ - 'need_to_migrate' => 'You need to update your database. Call "php artisan migrate" to run migrations.', - 'unable_to_check' => 'Unable to check for migrations: :reason', - ], - 'name' => 'The migrations are up to date', - ], - 'php_extensions_are_disabled' => [ - 'message' => 'The following extensions are still enabled:' . PHP_EOL . ':extensions', - 'name' => 'Unwanted PHP extensions are disabled', - ], - 'php_extensions_are_installed' => [ - 'message' => 'The following extensions are missing:' . PHP_EOL . ':extensions', - 'name' => 'The required PHP extensions are installed', - ], - 'redis_can_be_accessed' => [ - 'message' => [ - 'not_accessible' => 'The Redis cache can not be accessed: :error', - 'default_cache' => 'The default cache is not reachable.', - 'named_cache' => 'The named cache :name is not reachable.', - ], - 'name' => 'The Redis cache can be accessed', - ], - 'routes_are_cached' => [ - 'message' => 'Your routes should be cached in production for better performance. Call "php artisan route:cache" to create the route cache.', - 'name' => 'Routes are cached', - ], - 'routes_are_not_cached' => [ - 'message' => 'Your routes should not be cached during development. Call "php artisan route:clear" to clear the route cache.', - 'name' => 'Routes are not cached', - ], - 'servers_are_pingable' => [ - 'message' => "The server ':host' (port: :port) is not reachable (timeout after :timeout seconds).", - 'name' => 'Required servers are pingable', - ], - 'storage_directory_is_linked' => [ - 'message' => 'The storage directory is not linked. Use "php artisan storage:link" to create a symbolic link.', - 'name' => 'The storage directory is linked', - ], - 'supervisor_programs_are_running' => [ - 'message' => [ - 'cannot_run_on_windows' => 'This check cannot be run on Windows.', - 'not_running_programs' => 'The following programs are not running or require a restart:' . PHP_EOL . ':programs', - 'shell_exec_not_available' => 'The function "shell_exec" is not defined or disabled, so we cannot check the running programs.', - 'supervisor_command_not_available' => 'The "supervisorctl" command is not available on the current OS.', - ], - 'name' => 'All supervisor programs are running', - ], -]; + [ + 'message' => 'The application key is not set. Call "php artisan key:generate" to create and set one.', + 'name' => 'App key is set', + ], + 'cache_prefix_is_set' => [ + 'message' => 'A missing cache prefix could cause problems in shared hosting environments due to shared cache key access. Set a custom "CACHE_PREFIX" in your .env file.', + 'name' => 'Cache prefix is set' + ], + 'composer_with_dev_dependencies_is_up_to_date' => [ + 'message' => 'Your composer dependencies are not up to date. Call "composer install" to update them. :more', + 'name' => 'Composer dependencies (including dev) are up to date', + ], + 'composer_without_dev_dependencies_is_up_to_date' => [ + 'message' => 'Your composer dependencies are not up to date. Call "composer install" to update them. :more', + 'name' => 'Composer dependencies (without dev) are up to date', + ], + 'configuration_is_cached' => [ + 'message' => 'Your configuration should be cached in production for better performance. Call "php artisan config:cache" to create the configuration cache.', + 'name' => 'Configuration is cached', + ], + 'configuration_is_not_cached' => [ + 'message' => 'Your configuration files should not be cached during development. Call "php artisan config:clear" to clear the configuration cache.', + 'name' => 'Configuration is not cached', + ], + 'correct_php_version_is_installed' => [ + 'message' => 'You do not have the required PHP version installed.' . PHP_EOL . 'Required: :required' . PHP_EOL . 'Used: :used', + 'name' => 'The correct PHP version is installed', + ], + 'database_can_be_accessed' => [ + 'message' => 'The database can not be accessed: :error', + 'name' => 'The database can be accessed', + ], + 'debug_mode_is_not_enabled' => [ + 'message' => 'You should not use debug mode in production. Set "APP_DEBUG" in the .env file to "false".', + 'name' => 'Debug mode is not enabled', + ], + 'directories_have_correct_permissions' => [ + 'message' => 'The following directories are not writable:' . PHP_EOL .':directories', + 'name' => 'All directories have the correct permissions', + ], + 'env_file_exists' => [ + 'message' => 'The .env file does not exist. Please copy your .env.example file as .env and adjust accordingly.', + 'name' => 'The environment file exists', + ], + 'example_environment_variables_are_set' => [ + 'message' => 'These environment variables are missing in your .env file, but are defined in your .env.example:' . PHP_EOL . ':variables', + 'name' => 'The example environment variables are set', + ], + 'example_environment_variables_are_up_to_date' => [ + 'message' => 'These environment variables are defined in your .env file, but are missing in your .env.example:' . PHP_EOL . ':variables', + 'name' => 'The example environment variables are up-to-date', + ], + 'locales_are_installed' => [ + 'message' => [ + 'cannot_run_on_windows' => 'This check cannot be run on Windows.', + 'locale_command_not_available' => 'The "locale -a" command is not available on the current OS.', + 'missing_locales' => 'The following locales are missing:' . PHP_EOL . ':locales', + 'shell_exec_not_available' => 'The function "shell_exec" is not defined or disabled, so we cannot check the locales.', + ], + 'name' => 'Required locales are installed', + ], + 'maintenance_mode_not_enabled' => [ + 'message' => 'Maintenance mode is still enabled. Disable it with "php artisan up".', + 'name' => 'Maintenance mode is not enabled', + ], + 'migrations_are_up_to_date' => [ + 'message' => [ + 'need_to_migrate' => 'You need to update your database. Call "php artisan migrate" to run migrations.', + 'unable_to_check' => 'Unable to check for migrations: :reason', + ], + 'name' => 'The migrations are up to date', + ], + 'php_extensions_are_disabled' => [ + 'message' => 'The following extensions are still enabled:' . PHP_EOL . ':extensions', + 'name' => 'Unwanted PHP extensions are disabled', + ], + 'php_extensions_are_installed' => [ + 'message' => 'The following extensions are missing:' . PHP_EOL . ':extensions', + 'name' => 'The required PHP extensions are installed', + ], + 'redis_can_be_accessed' => [ + 'message' => [ + 'not_accessible' => 'The Redis cache can not be accessed: :error', + 'default_cache' => 'The default cache is not reachable.', + 'named_cache' => 'The named cache :name is not reachable.', + ], + 'name' => 'The Redis cache can be accessed', + ], + 'routes_are_cached' => [ + 'message' => 'Your routes should be cached in production for better performance. Call "php artisan route:cache" to create the route cache.', + 'name' => 'Routes are cached', + ], + 'routes_are_not_cached' => [ + 'message' => 'Your routes should not be cached during development. Call "php artisan route:clear" to clear the route cache.', + 'name' => 'Routes are not cached', + ], + 'servers_are_pingable' => [ + 'message' => "The server ':host' (port: :port) is not reachable (timeout after :timeout seconds).", + 'name' => 'Required servers are pingable', + ], + 'storage_directory_is_linked' => [ + 'message' => 'The storage directory is not linked. Use "php artisan storage:link" to create a symbolic link.', + 'name' => 'The storage directory is linked', + ], + 'supervisor_programs_are_running' => [ + 'message' => [ + 'cannot_run_on_windows' => 'This check cannot be run on Windows.', + 'not_running_programs' => 'The following programs are not running or require a restart:' . PHP_EOL . ':programs', + 'shell_exec_not_available' => 'The function "shell_exec" is not defined or disabled, so we cannot check the running programs.', + 'supervisor_command_not_available' => 'The "supervisorctl" command is not available on the current OS.', + ], + 'name' => 'All supervisor programs are running', + ], +];