API Deprecate references to installation tool (#11275)

This commit is contained in:
Guy Sartorelli 2024-06-12 15:47:12 +12:00 committed by GitHub
parent be0eab2bae
commit 049e546247
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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\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(

View File

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