mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge branch '5' into 6
This commit is contained in:
commit
8179047af5
@ -27,6 +27,7 @@ use SilverStripe\View\SSViewer;
|
||||
use SilverStripe\View\ThemeManifest;
|
||||
use SilverStripe\View\ThemeResourceLoader;
|
||||
use Exception;
|
||||
use SilverStripe\Dev\Deprecation;
|
||||
|
||||
/**
|
||||
* Simple Kernel container
|
||||
@ -308,10 +309,13 @@ abstract class BaseKernel implements Kernel
|
||||
* If missing configuration, redirect to install.php if it exists.
|
||||
* Otherwise show a server error to the user.
|
||||
*
|
||||
* @deprecated 5.3.0 Will be removed without equivalent functionality
|
||||
*
|
||||
* @param string $msg Optional message to show to the user on an installed project (install.php missing).
|
||||
*/
|
||||
protected function redirectToInstaller($msg = '')
|
||||
{
|
||||
Deprecation::notice('5.3.0', 'Will be removed without equivalent functionality');
|
||||
// Error if installer not available
|
||||
if (!file_exists(Director::publicFolder() . '/install.php')) {
|
||||
throw new HTTPResponse_Exception(
|
||||
|
@ -7,6 +7,7 @@ use SilverStripe\Dev\Install\DatabaseAdapterRegistry;
|
||||
use SilverStripe\ORM\DB;
|
||||
use Exception;
|
||||
use LogicException;
|
||||
use SilverStripe\Dev\Deprecation;
|
||||
|
||||
/**
|
||||
* Simple Kernel container
|
||||
@ -52,7 +53,7 @@ class CoreKernel extends BaseKernel
|
||||
$msg = 'Silverstripe Framework requires a "database" key in DB::getConfig(). ' .
|
||||
'Did you forget to set SS_DATABASE_NAME or SS_DATABASE_CHOOSE_NAME in your environment?';
|
||||
$this->detectLegacyEnvironment();
|
||||
$this->redirectToInstaller($msg);
|
||||
Deprecation::withNoReplacement(fn() => $this->redirectToInstaller($msg));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user