Compare commits

..

11 Commits

Author SHA1 Message Date
Michal Kleiner 9881c03c22 Merge branch '2.7' into 2 2023-05-19 22:22:54 +12:00
Guy Sartorelli e8517ebfb0
Merge pull request #90 from silverstripe/85-implode-args-order
Fix arguments order in SolrIndexCheck
2023-05-19 20:43:40 +12:00
Michal Kleiner 28ca036345
Fix arguments order in SolrIndexCheck 2023-05-19 14:53:43 +12:00
Guy Sartorelli 16caad30b2
Merge branch '2.7' into 2 2023-04-26 12:48:24 +12:00
Maxime Rainville 6f6c30bdcc
Merge pull request #87 from creative-commoners/pulls/2.7/fix-constraints
MNT Revert erroneous dependency changes
2023-03-28 17:15:30 +13:00
Guy Sartorelli f918209e35
MNT Revert erroneous dependency changes 2023-03-28 14:55:27 +13:00
Maxime Rainville 714de64252
Merge pull request #86 from creative-commoners/pulls/2/dispatch-ci
MNT Use gha-dispatch-ci
2023-03-23 14:10:44 +13:00
Steve Boyd d9d245a0da MNT Use gha-dispatch-ci 2023-03-21 12:24:56 +13:00
Guy Sartorelli 9d5f8fce7d
MNT Update development dependencies 2023-03-10 16:36:51 +13:00
Guy Sartorelli f12698f47f
MNT Update release dependencies 2023-03-10 16:36:47 +13:00
Guy Sartorelli 6f0d1c84f2
MNT Update development dependencies 2023-03-10 12:21:31 +13:00
6 changed files with 113 additions and 12 deletions

View File

@ -4,13 +4,8 @@ on:
push:
pull_request:
workflow_dispatch:
# Every Wednesday at 1:20pm UTC
schedule:
- cron: '20 13 * * 3'
jobs:
ci:
name: CI
# Only run cron on the silverstripe account
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1

16
.github/workflows/dispatch-ci.yml vendored Normal file
View File

@ -0,0 +1,16 @@
name: Dispatch CI
on:
# At 1:20 PM UTC, only on Wednesday and Thursday
schedule:
- cron: '20 13 * * 3,4'
jobs:
dispatch-ci:
name: Dispatch CI
# Only run cron on the silverstripe account
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
runs-on: ubuntu-latest
steps:
- name: Dispatch CI
uses: silverstripe/gha-dispatch-ci@v1

29
.upgrade.yml Normal file
View File

@ -0,0 +1,29 @@
mappings:
EnvironmentCheck: SilverStripe\EnvironmentCheck\EnvironmentCheck
EnvironmentChecker: SilverStripe\EnvironmentCheck\EnvironmentChecker
EnvironmentCheckSuite: SilverStripe\EnvironmentCheck\EnvironmentCheckSuite
EnvironmentCheckSuiteResult: SilverStripe\EnvironmentCheck\EnvironmentCheckSuiteResult
DatabaseCheck: SilverStripe\EnvironmentCheck\Checks\DatabaseCheck
ExternalURLCheck: SilverStripe\EnvironmentCheck\Checks\ExternalURLCheck
FileAccessibilityAndValidationCheck: SilverStripe\EnvironmentCheck\Checks\FileAccessibilityAndValidationCheck
FileAgeCheck: SilverStripe\EnvironmentCheck\Checks\FileAgeCheck
FileWriteableCheck: SilverStripe\EnvironmentCheck\Checks\FileWriteableCheck
HasClassCheck: SilverStripe\EnvironmentCheck\Checks\HasClassCheck
HasFunctionCheck: SilverStripe\EnvironmentCheck\Checks\HasFunctionCheck
SMTPConnectCheck: SilverStripe\EnvironmentCheck\Checks\SMTPConnectCheck
SolrIndexCheck: SilverStripe\EnvironmentCheck\Checks\SolrIndexCheck
URLCheck: SilverStripe\EnvironmentCheck\Checks\URLCheck
DevCheckController: SilverStripe\EnvironmentCheck\Controllers\DevCheckController
DevHealthController: SilverStripe\EnvironmentCheck\Controllers\DevHealthController
EnvironmentCheckerTest: SilverStripe\EnvironmentCheck\Tests\EnvironmentCheckerTest
EnvironmentCheckerTest_CheckNoErrors: SilverStripe\EnvironmentCheck\Tests\EnvironmentCheckerTest_CheckNoErrors
EnvironmentCheckerTest_CheckWarnings: SilverStripe\EnvironmentCheck\Tests\EnvironmentCheckerTest_CheckWarnings
EnvironmentCheckerTest_CheckErrors: SilverStripe\EnvironmentCheck\Tests\EnvironmentCheckerTest_CheckErrors
DatabaseCheckTest: SilverStripe\EnvironmentCheck\Tests\Checks\DatabaseCheckTest
ExternalURLCheckTest: SilverStripe\EnvironmentCheck\Tests\Checks\ExternalURLCheckTest
FileWritableCheckTest: SilverStripe\EnvironmentCheck\Tests\Checks\FileWritableCheckTest
HasClassCheckTest: SilverStripe\EnvironmentCheck\Tests\Checks\HasClassCheckTest
HasFunctionCheckTest: SilverStripe\EnvironmentCheck\Tests\Checks\HasFunctionCheckTest
URLCheckTest: SilverStripe\EnvironmentCheck\Tests\Checks\URLCheckTest
DevCheckControllerTest: SilverStripe\EnvironmentCheck\Tests\Controllers\DevCheckControllerTest
DevHealthControllerTest: SilverStripe\EnvironmentCheck\Tests\Controllers\DevHealthControllerTest

View File

@ -20,14 +20,14 @@
}
],
"require": {
"php": "^8.1",
"silverstripe/framework": "^5",
"silverstripe/versioned": "^2",
"guzzlehttp/guzzle": "^7"
"php": "^7.4 || ^8.0",
"silverstripe/framework": "^4.10",
"silverstripe/versioned": "^1.0",
"guzzlehttp/guzzle": "^6.3.3 || ^7"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3"
"squizlabs/php_codesniffer": "^3.0"
},
"extra": [],
"autoload": {
@ -38,4 +38,4 @@
},
"minimum-stability": "dev",
"prefer-stable": true
}
}

View File

@ -43,7 +43,7 @@ class SolrIndexCheck implements EnvironmentCheck
if (!empty($brokenCores)) {
return [
EnvironmentCheck::ERROR,
'The following indexes are unavailable: ' . implode($brokenCores ?? '', ', ')
'The following indexes are unavailable: ' . implode(', ', $brokenCores)
];
}

View File

@ -11,6 +11,7 @@ use SilverStripe\Control\HTTPResponse_Exception;
use SilverStripe\Control\RequestHandler;
use SilverStripe\Core\Environment;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Dev\Deprecation;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
use SilverStripe\Security\Security;
@ -273,4 +274,64 @@ class EnvironmentChecker extends RequestHandler
return $this;
}
/**
* @deprecated 2.0.0 Use config API instead
* @param string $from
*/
public static function set_from_email_address($from)
{
Deprecation::notice('2.0.0', 'Use config API instead');
static::config()->set('from_email_address', $from);
}
/**
* @deprecated 2.0.0 Use config API instead
* @return null|string
*/
public static function get_from_email_address()
{
Deprecation::notice('2.0.0', 'Use config API instead');
return static::config()->get('from_email_address');
}
/**
* @deprecated 2.0.0 Use config API instead
* @param string $to
*/
public static function set_to_email_address($to)
{
Deprecation::notice('2.0.0', 'Use config API instead');
static::config()->set('to_email_address', $to);
}
/**
* @deprecated 2.0.0 Use config API instead
* @return null|string
*/
public static function get_to_email_address()
{
Deprecation::notice('2.0.0', 'Use config API instead');
return static::config()->get('to_email_address');
}
/**
* @deprecated 2.0.0 Use config API instead
* @param bool $results
*/
public static function set_email_results($results)
{
Deprecation::notice('2.0.0', 'Use config API instead');
static::config()->set('email_results', $results);
}
/**
* @deprecated 2.0.0 Use config API instead
* @return bool
*/
public static function get_email_results()
{
Deprecation::notice('2.0.0', 'Use config API instead');
return static::config()->get('email_results');
}
}