Skip to content

Instantly share code, notes, and snippets.

@fchaussin
Created March 18, 2020 14:19
Show Gist options
  • Save fchaussin/a901c1458d5a3d8b539a2f604a8bfc33 to your computer and use it in GitHub Desktop.
Save fchaussin/a901c1458d5a3d8b539a2f604a8bfc33 to your computer and use it in GitHub Desktop.
Display SQL debug for TYPO3 Extbase query builder
$query = $this->createQuery();
$query->equals('mm.uid_foreign', $uid);
$return = $query->count();
$queryParser = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser::class);
\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($queryParser->convertQueryToDoctrineQueryBuilder($query)->getSQL());
// \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($queryParser->convertQueryToDoctrineQueryBuilder($query)->getParameters());
return $return;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment