// The connection is closed
$existingConnection = null;
} } if ($existingConnection === null
) { $existingConnection = self::
$connection =
$kernelClass::
getConnection();
} // force connection to database
$existingConnection->
fetchOne('SELECT 1'
);
$pluginLoader =
new DbalKernelPluginLoader(self::
$classLoader, null,
$existingConnection);
} catch (\Throwable
) { // if we don't have database yet, we'll boot the kernel without plugins
$pluginLoader =
new StaticKernelPluginLoader(self::
$classLoader);
} return new $kernelClass($env,
$debug,
$pluginLoader,
$cacheId, null,
$existingConnection,
$projectDir);
} /**
* @return class-string<Kernel>
*/