mirror of
https://github.com/flarum/core.git
synced 2025-08-04 23:47:32 +02:00
Normalize Base URL during installation
- Fix base url when is appended with a script filename - Add default base url http://flarum.local when CLI wizard used - Remove some code duplication - Add minor improvement to the UX when CLI wizard used - Add tests - Extract base url normalisation into its own value object
This commit is contained in:
committed by
Alexander Skvortsov
parent
93d6b235e3
commit
3decf1b658
@@ -10,6 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
use Flarum\Install\AdminUser;
|
use Flarum\Install\AdminUser;
|
||||||
|
use Flarum\Install\BaseUrl;
|
||||||
use Flarum\Install\DatabaseConfig;
|
use Flarum\Install\DatabaseConfig;
|
||||||
use Flarum\Install\Installation;
|
use Flarum\Install\Installation;
|
||||||
|
|
||||||
@@ -48,7 +49,7 @@ $installation = new Installation(
|
|||||||
$pipeline = $installation
|
$pipeline = $installation
|
||||||
->configPath('config.php')
|
->configPath('config.php')
|
||||||
->debugMode(true)
|
->debugMode(true)
|
||||||
->baseUrl('http://localhost')
|
->baseUrl(BaseUrl::fromString('http://localhost'))
|
||||||
->databaseConfig(new DatabaseConfig(
|
->databaseConfig(new DatabaseConfig(
|
||||||
'mysql',
|
'mysql',
|
||||||
env('DB_HOST', 'localhost'),
|
env('DB_HOST', 'localhost'),
|
||||||
|
Reference in New Issue
Block a user