The following patch https://gerrit.wikimedia.org/r/c/mediawiki/core/+/657900 fails phan taint check and produces very obscure errors in seemingly entirely unrelated codepaths - https://integration.wikimedia.org/ci/job/mediawiki-core-php72-phan-docker/40225/console for example.
At first I have wrote the new code using SelectQueryBuilder, so thought it was due to T253380 but then I've rolled back the SelectQueryBuilder changes with no effect.
Needs investigation.