1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 08:17:47 +02:00

[ticket/16741] General fixes

PHPBB3-16741
This commit is contained in:
Tristan Darricau
2021-11-09 02:48:34 +01:00
parent 300e5399f5
commit 6ce708539b
20 changed files with 941 additions and 385 deletions

View File

@@ -49,8 +49,15 @@ $classes = $finder->core_path('phpbb/')
->get_classes();
$db = new \phpbb\db\driver\sqlite3();
// The database is not used by db\tools when we generate the schema but it requires a doctrine DBAL object
// which always tries to connect to the database in the constructor. Which means if we want a valid doctrine
// Connection object that is not connected to any database we have to do that.
$ref = new ReflectionClass(\Doctrine\DBAL\Connection::class);
$db_doctrine = $ref->newInstanceWithoutConstructor();
$factory = new \phpbb\db\tools\factory();
$db_tools = $factory->get($db, true);
$db_tools = $factory->get($db_doctrine, true);
$tables_data = \Symfony\Component\Yaml\Yaml::parseFile($phpbb_root_path . '/config/default/container/tables.yml');
$tables = [];