chore: remove retundant .env files. some additional fixes

This commit is contained in:
2025-10-27 19:07:12 +01:00
parent 62999c40cd
commit 8ef2b8547d
21 changed files with 74 additions and 1570 deletions

View File

@@ -159,6 +159,27 @@ final readonly class ContainerBootstrapper
return $request;
});
// TEMPORARY FIX: Manual DatabasePlatform binding until Initializer Discovery issue is resolved
$container->singleton(\App\Framework\Database\Platform\DatabasePlatform::class, function ($container) {
error_log("ContainerBootstrapper: Creating DatabasePlatform singleton");
$env = $container->get(\App\Framework\Config\Environment::class);
$driver = $env->get('DB_DRIVER', 'pgsql');
error_log("ContainerBootstrapper: DB_DRIVER = {$driver}");
$platform = match($driver) {
'mysql', 'mysqli' => new \App\Framework\Database\Platform\MySQLPlatform(),
'pgsql', 'postgres', 'postgresql' => new \App\Framework\Database\Platform\PostgreSQLPlatform(),
'sqlite' => throw new \RuntimeException('SQLite platform not yet implemented'),
default => throw new \RuntimeException("Unsupported database driver: {$driver}")
};
error_log("ContainerBootstrapper: DatabasePlatform created: " . get_class($platform));
return $platform;
});
}
/**