mirror of
https://github.com/flarum/core.git
synced 2025-07-31 13:40:20 +02:00
DatabaseConfig: Implement Arrayable contract
This commit is contained in:
@@ -52,7 +52,7 @@ class DefaultInstallationTest extends TestCase
|
||||
{
|
||||
$factory = new ConnectionFactory(app());
|
||||
|
||||
return $factory->make($this->getDatabaseConfiguration()->getConfig());
|
||||
return $factory->make($this->getDatabaseConfiguration()->toArray());
|
||||
}
|
||||
|
||||
private function getAdmin(): AdminUser
|
||||
|
@@ -107,7 +107,7 @@ trait CreatesForum
|
||||
{
|
||||
return [
|
||||
'debug' => true,
|
||||
'database' => $this->getDatabaseConfiguration()->getConfig(),
|
||||
'database' => $this->getDatabaseConfiguration()->toArray(),
|
||||
'url' => 'http://flarum.local',
|
||||
'paths' => [
|
||||
'api' => 'api',
|
||||
@@ -122,7 +122,7 @@ trait CreatesForum
|
||||
return;
|
||||
}
|
||||
|
||||
$dbConfig = $this->getDatabaseConfiguration()->getConfig();
|
||||
$dbConfig = $this->getDatabaseConfiguration()->toArray();
|
||||
|
||||
$pdo = (new MySqlConnector)->connect($dbConfig);
|
||||
$db = new MySqlConnection($pdo, $dbConfig['database'], $dbConfig['prefix'], $dbConfig);
|
||||
|
Reference in New Issue
Block a user