Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Debug TYPO3 Doctrine Query
$queryParser = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser::class);
$sql = $queryParser->convertQueryToDoctrineQueryBuilder($query)->getSQL();
$paramters = $queryParser->convertQueryToDoctrineQueryBuilder($query)->getParameters();
$search = array();
$replace = array();
foreach ($paramters as $k => $v) {
$search[] = ':' . $k;
$replace[] = '\'' . $v . '\'';
}
$sql = str_replace($search, $replace, $sql);
print_r($sql);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment