Skip to content

Instantly share code, notes, and snippets.

@markuspoerschke
Created April 4, 2019 08:30
Show Gist options
  • Save markuspoerschke/591c9c4b031714d1324315ad6d4b75a4 to your computer and use it in GitHub Desktop.
Save markuspoerschke/591c9c4b031714d1324315ad6d4b75a4 to your computer and use it in GitHub Desktop.
Get SQL query as string from Extbase Query
<?php
// ...
$queryParser = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser::class);
\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($queryParser->convertQueryToDoctrineQueryBuilder($query)->getSQL());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment