Skip to content

Commit 48446ee

Browse files
committed
update README.md to explain check options
also updates the config.php snippet in the readme
1 parent 9269b94 commit 48446ee

File tree

1 file changed

+43
-4
lines changed

1 file changed

+43
-4
lines changed

README.md

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ return [
7575
'environment_aliases' => [
7676
'prod' => 'production',
7777
'live' => 'production',
78+
'local' => 'development',
7879
],
7980

8081
/*
@@ -83,12 +84,31 @@ return [
8384
'checks' => [
8485
\BeyondCode\SelfDiagnosis\Checks\AppKeyIsSet::class,
8586
\BeyondCode\SelfDiagnosis\Checks\CorrectPhpVersionIsInstalled::class,
86-
\BeyondCode\SelfDiagnosis\Checks\DatabaseCanBeAccessed::class,
87-
\BeyondCode\SelfDiagnosis\Checks\DirectoriesHaveCorrectPermissions::class,
87+
\BeyondCode\SelfDiagnosis\Checks\DatabaseCanBeAccessed::class => [
88+
'default_connection' => true,
89+
'connections' => [],
90+
],
91+
\BeyondCode\SelfDiagnosis\Checks\DirectoriesHaveCorrectPermissions::class => [
92+
'directories' => [
93+
storage_path(),
94+
base_path('bootstrap/cache'),
95+
],
96+
],
8897
\BeyondCode\SelfDiagnosis\Checks\EnvFileExists::class,
8998
\BeyondCode\SelfDiagnosis\Checks\ExampleEnvironmentVariablesAreSet::class,
9099
\BeyondCode\SelfDiagnosis\Checks\MigrationsAreUpToDate::class,
91-
\BeyondCode\SelfDiagnosis\Checks\PhpExtensionsAreInstalled::class,
100+
\BeyondCode\SelfDiagnosis\Checks\PhpExtensionsAreInstalled::class => [
101+
'extensions' => [
102+
'openssl',
103+
'PDO',
104+
'mbstring',
105+
'tokenizer',
106+
'xml',
107+
'ctype',
108+
'json',
109+
],
110+
'include_composer_extensions' => true,
111+
],
92112
\BeyondCode\SelfDiagnosis\Checks\StorageDirectoryIsLinked::class,
93113
],
94114

@@ -105,14 +125,33 @@ return [
105125
\BeyondCode\SelfDiagnosis\Checks\ComposerWithoutDevDependenciesIsUpToDate::class,
106126
\BeyondCode\SelfDiagnosis\Checks\ConfigurationIsCached::class,
107127
\BeyondCode\SelfDiagnosis\Checks\DebugModeIsNotEnabled::class,
128+
\BeyondCode\SelfDiagnosis\Checks\PhpExtensionsAreDisabled::class => [
129+
'extensions' => [
130+
'xdebug',
131+
],
132+
],
108133
\BeyondCode\SelfDiagnosis\Checks\RoutesAreCached::class,
109-
\BeyondCode\SelfDiagnosis\Checks\XDebugIsNotEnabled::class,
110134
],
111135
],
112136

113137
];
114138
```
115139

140+
#### Available Configuration Options
141+
142+
The following options are available for the individual checks:
143+
144+
- [`BeyondCode\SelfDiagnosis\Checks\DatabaseCanBeAccessed`](src/Checks/DatabaseCanBeAccessed.php)
145+
- **default_connection** *(boolean, default: `true`)*: if the default connection should be checked
146+
- **connections** *(array, list of connection names like `['mysql', 'sqlsrv']`, default: `[]`)*: additional connections to check
147+
- [`BeyondCode\SelfDiagnosis\Checks\DirectoriesHaveCorrectPermissions`](src/Checks/DirectoriesHaveCorrectPermissions.php)
148+
- **directories** *(array, list of directory paths like `[storage_path(), base_path('bootstrap/cache')]`, default: `[]`)*: directories to check
149+
- [`BeyondCode\SelfDiagnosis\Checks\PhpExtensionsAreDisabled`](src/Checks/PhpExtensionsAreDisabled.php)
150+
- **extensions** *(array, list of extension names like `['xdebug', 'zlib']`, default: `[]`)*: extensions to check
151+
- [`BeyondCode\SelfDiagnosis\Checks\PhpExtensionsAreInstalled`](src/Checks/PhpExtensionsAreInstalled.php)
152+
- **extensions** *(array, list of extension names like `['openssl', 'PDO']`, default: `[]`)*: extensions to check
153+
- **include_composer_extensions** *(boolean, default: `false`)*: if required extensions defined in `composer.json` should be checked
154+
116155
### Custom Checks
117156

118157
You can create custom checks, by implementing the [`BeyondCode\SelfDiagnosis\Checks\Check`](src/Checks/Check.php) interface and adding the class to the config file.

0 commit comments

Comments
 (0)