Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Deprecate references to installation tool #11275

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Core/BaseKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use SilverStripe\View\ThemeManifest;
use SilverStripe\View\ThemeResourceLoader;
use Exception;
use SilverStripe\Dev\Deprecation;

/**
* Simple Kernel container
Expand Down Expand Up @@ -308,10 +309,13 @@ protected function detectLegacyEnvironment()
* 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(
Expand Down
3 changes: 2 additions & 1 deletion src/Core/CoreKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use SilverStripe\ORM\DB;
use Exception;
use LogicException;
use SilverStripe\Dev\Deprecation;

/**
* Simple Kernel container
Expand Down Expand Up @@ -52,7 +53,7 @@ protected function validateDatabase()
$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));
}
}

Expand Down
Loading