mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-29 16:44:44 +02:00
Installer: fix argument types for testConnection
& return type for submit
(#650)
* fix argument types for `testConnection` * fix return type of submit
This commit is contained in:
parent
3d5c8d14bd
commit
a193b4f5ab
@ -25,6 +25,7 @@ use Filament\Pages\SimplePage;
|
|||||||
use Filament\Support\Enums\MaxWidth;
|
use Filament\Support\Enums\MaxWidth;
|
||||||
use Filament\Support\Exceptions\Halt;
|
use Filament\Support\Exceptions\Halt;
|
||||||
use Illuminate\Http\RedirectResponse;
|
use Illuminate\Http\RedirectResponse;
|
||||||
|
use Illuminate\Routing\Redirector;
|
||||||
use Illuminate\Support\Facades\Artisan;
|
use Illuminate\Support\Facades\Artisan;
|
||||||
use Illuminate\Support\Facades\Blade;
|
use Illuminate\Support\Facades\Blade;
|
||||||
use Illuminate\Support\HtmlString;
|
use Illuminate\Support\HtmlString;
|
||||||
@ -94,7 +95,7 @@ class PanelInstaller extends SimplePage implements HasForms
|
|||||||
return 'data';
|
return 'data';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function submit(): RedirectResponse
|
public function submit(): Redirector|RedirectResponse
|
||||||
{
|
{
|
||||||
// Disable installer
|
// Disable installer
|
||||||
$this->writeToEnvironment(['APP_INSTALLED' => 'true']);
|
$this->writeToEnvironment(['APP_INSTALLED' => 'true']);
|
||||||
|
@ -72,7 +72,7 @@ class DatabaseStep
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function testConnection(string $driver, string $host, string $port, string $database, string $username, string $password): bool
|
private static function testConnection(string $driver, ?string $host, null|string|int $port, ?string $database, ?string $username, ?string $password): bool
|
||||||
{
|
{
|
||||||
if ($driver === 'sqlite') {
|
if ($driver === 'sqlite') {
|
||||||
return true;
|
return true;
|
||||||
|
@ -56,7 +56,7 @@ class RedisStep
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function testConnection(string $host, string $port, string $username, string $password): bool
|
private static function testConnection(string $host, null|string|int $port, ?string $username, ?string $password): bool
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
config()->set('database.redis._panel_install_test', [
|
config()->set('database.redis._panel_install_test', [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user