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