Skip to content

DoctrineDbalParams

Shared translation of flat databases.xml parameters into a Doctrine DBAL connection-parameters array, used by both DoctrineDatabase and DoctrineDbalDatabase.

DBAL 4’s DriverManager no longer parses a url parameter itself (that moved to DsnParser), and no longer accepts an arbitrary connection array — it expects a closed parameter shape with per-key types. So a url is parsed up front, and flat params are validated/typed one key at a time rather than assembled with array_filter().

trait DoctrineDbalParams

SourceDoctrineDbalParams.php
MethodDescription
dbalParams(): Params
normalizeInlineDbalParams(mixed $raw): ParamsValidates and re-types an inline connection array (as opposed to the flat params handled by DoctrineDbalParams::dbalParams()) into DBAL’s expected parameter shape.

protected function dbalParams(): Params

Returns Params

protected function normalizeInlineDbalParams(mixed $raw): Params

Validates and re-types an inline connection array (as opposed to the flat params handled by DoctrineDbalParams::dbalParams()) into DBAL’s expected parameter shape.

primary/replica (master/replica overrides) are intentionally rejected — configure those connections separately.

ParameterTypeDescription
$rawmixed

Returns Params