The Venn diagram of developers who can't successfully use an ORM, but can write their own sane, well formed, normalized data access layer from scratch using just SQL are two entirely separated circles
Normal people write queries in a bunch of specialised classes. Data access in php is a pdo method call away anyway. But no, php devs need ddd dtos hydration models yml file configs goat sacrifices and a heated religious debate over why php is the belly bottom of web development and indeed the world. Tabs vs spaces.
Such a nice language bastardised by over engineering and reinventing the wheel. Sad.