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().
Synopsis
Section titled “Synopsis”trait DoctrineDbalParams
| Source | DoctrineDbalParams.php |
Methods
Section titled “Methods”| Method | Description |
|---|---|
dbalParams(): Params | |
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. |
dbalParams()
Section titled “dbalParams()”protected function dbalParams(): Params
Returns Params
normalizeInlineDbalParams()
Section titled “normalizeInlineDbalParams()”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.
| Parameter | Type | Description |
|---|---|---|
$raw | mixed |
Returns Params