Merge branch '5' into 6

This commit is contained in:
github-actions 2024-06-12 21:03:36 +00:00
commit 8179047af5
2 changed files with 6 additions and 1 deletions

View File

@ -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(

View File

@ -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));
}
}