ENH Update config to reflect changes in CLI interaction (#112)

This commit is contained in:
Guy Sartorelli 2024-09-26 17:28:48 +12:00 committed by GitHub
parent 9cd1ae9a3b
commit 51b9b649c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 76 deletions

View File

@ -73,7 +73,7 @@ SilverStripe\EnvironmentCheck\EnvironmentCheckSuite:
* `HasClassCheck`: Check that the given class exists.
This can be used to check that PHP modules or features are installed.
* `FileWriteableCheck`: Check that the given file is writeable.
* `FileAccessibilityAndValidationCheck`: Check that a given file is accessible and optionally matches a given format.
* `FileAccessibilityAndValidationCheck`: Check that a given file is accessible and optionally matches a given format.
* `FileAgeCheck`: Checks for the maximum age of one or more files or folders.
Useful for files which should be frequently auto-generated,
like static caches, as well as for backup files and folders.

View File

@ -1,70 +0,0 @@
<?php
//
//use SilverStripe\EnvironmentCheck\EnvironmentCheckSuite;
//
//// These power dev/health, which can be used by load balancers and other such systems
//EnvironmentCheckSuite::register('health', 'DatabaseCheck');
//
//// These power dev/check, which is used for diagnostics and for deployment
//EnvironmentCheckSuite::register('check', 'DatabaseCheck("Member")', "Is the database accessible?");
//EnvironmentCheckSuite::register('check', 'URLCheck("")', "Is the homepage accessible?");
//
//EnvironmentCheckSuite::register(
// 'check',
// 'HasFunctionCheck("curl_init")',
// "Does PHP have CURL support?"
//);
//
//EnvironmentCheckSuite::register(
// 'check',
// 'HasFunctionCheck("imagecreatetruecolor")',
// "Does PHP have GD2 support?"
//);
//
//EnvironmentCheckSuite::register(
// 'check',
// 'HasFunctionCheck("xml_set_object")',
// "Does PHP have XML support?"
//);
//
//EnvironmentCheckSuite::register(
// 'check',
// 'HasFunctionCheck("token_get_all")',
// "Does PHP have tokenizer support?"
//);
//
//EnvironmentCheckSuite::register(
// 'check',
// 'HasFunctionCheck("iconv")',
// "Does PHP have iconv support?"
//);
//
//EnvironmentCheckSuite::register(
// 'check',
// 'HasFunctionCheck("hash")',
// "Does PHP have hash support?"
//);
//
//EnvironmentCheckSuite::register(
// 'check',
// 'HasFunctionCheck("session_start")',
// "Does PHP have session support?"
//);
//
//EnvironmentCheckSuite::register(
// 'check',
// 'HasClassCheck("DOMDocument")',
// "Does PHP have DOMDocument support?"
//);
//
//EnvironmentCheckSuite::register(
// 'check',
// 'FileWriteableCheck("assets")',
// "Is assets/ writeable?"
//);
//
//EnvironmentCheckSuite::register(
// 'check',
// 'FileWriteableCheck("' . TEMP_FOLDER . '")',
// "Is the temp folder writeable?"
//);

View File

@ -4,14 +4,12 @@ Name: environmentcheckroutes
SilverStripe\Control\Director:
rules:
'health/check': 'Silverstripe\EnvironmentCheck\Controllers\DevHealthController'
'dev/check/$Suite': 'Silverstripe\EnvironmentCheck\Controllers\DevCheckController'
SilverStripe\Dev\DevelopmentAdmin:
registered_controllers:
controllers:
check:
controller: Silverstripe\EnvironmentCheck\Controllers\DevCheckController
links:
check: 'Run registered environment checks and display their status'
class: Silverstripe\EnvironmentCheck\Controllers\DevCheckController
description: 'Run registered environment checks and display their status'
---
Name: environmentcheckroutes-dev_urls-confirmation-exceptions

View File

@ -14,6 +14,10 @@ use SilverStripe\EnvironmentCheck\EnvironmentChecker;
*/
class DevCheckController extends Controller
{
private static $url_handlers = [
'$Suite' => 'index',
];
/**
* @var array
*/