Merge 1280a1a58fc8360faa349921d1c5efd4cfb0f97b into 9cd1ae9a3bc49b388fdf167aeee95e4965df9926

This commit is contained in:
Guy Sartorelli 2024-09-23 22:33:17 +00:00 committed by GitHub
commit 4d551af50c
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. * `HasClassCheck`: Check that the given class exists.
This can be used to check that PHP modules or features are installed. This can be used to check that PHP modules or features are installed.
* `FileWriteableCheck`: Check that the given file is writeable. * `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. * `FileAgeCheck`: Checks for the maximum age of one or more files or folders.
Useful for files which should be frequently auto-generated, Useful for files which should be frequently auto-generated,
like static caches, as well as for backup files and folders. 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: SilverStripe\Control\Director:
rules: rules:
'health/check': 'Silverstripe\EnvironmentCheck\Controllers\DevHealthController' 'health/check': 'Silverstripe\EnvironmentCheck\Controllers\DevHealthController'
'dev/check/$Suite': 'Silverstripe\EnvironmentCheck\Controllers\DevCheckController'
SilverStripe\Dev\DevelopmentAdmin: SilverStripe\Dev\DevelopmentAdmin:
registered_controllers: controllers:
check: check:
controller: Silverstripe\EnvironmentCheck\Controllers\DevCheckController class: Silverstripe\EnvironmentCheck\Controllers\DevCheckController
links: description: 'Run registered environment checks and display their status'
check: 'Run registered environment checks and display their status'
--- ---
Name: environmentcheckroutes-dev_urls-confirmation-exceptions Name: environmentcheckroutes-dev_urls-confirmation-exceptions

View File

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