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 Remove references to non-existent installation tool #11274

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
26 changes: 0 additions & 26 deletions src/Core/BaseKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
use SilverStripe\View\ThemeManifest;
use SilverStripe\View\ThemeResourceLoader;
use Exception;
use SilverStripe\Dev\Deprecation;

/**
* Simple Kernel container
Expand Down Expand Up @@ -305,31 +304,6 @@ protected function detectLegacyEnvironment()
throw new HTTPResponse_Exception($response);
}

/**
* 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(
$msg,
500
);
}

// Redirect to installer
$response = new HTTPResponse();
$response->redirect(Director::absoluteURL('install.php'));
throw new HTTPResponse_Exception($response);
}

/**
* @return ManifestCacheFactory
*/
Expand Down
5 changes: 2 additions & 3 deletions src/Core/CoreKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use SilverStripe\ORM\DB;
use Exception;
use LogicException;
use SilverStripe\Dev\Deprecation;

/**
* Simple Kernel container
Expand Down Expand Up @@ -48,12 +47,12 @@ public function boot($flush = false)
protected function validateDatabase()
{
$databaseConfig = DB::getConfig();
// Gracefully fail if no DB is configured
// Fail if no DB is configured
if (empty($databaseConfig['database'])) {
$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();
Deprecation::withNoReplacement(fn() => $this->redirectToInstaller($msg));
throw new HTTPResponse_Exception($msg, 500);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
"public-files-installed": [
".htaccess",
"index.php",
"install-frameworkmissing.html",
"install.php",
"web.config"
],
"resources-dir": "customised-resources-dir"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
"public-files-installed": [
".htaccess",
"index.php",
"install-frameworkmissing.html",
"install.php",
"web.config"
]
},
Expand Down
Loading