doctrine-dbal example

For this blog I needed the 10 most used tags (tag) with a count of the entries (entry) assigned to each tag. I used the chance to make myself familiar with doctrine-dbal, since with the upcoming TYPO3 9 the good old TYPO3_DB will no longer be […]

Typo3 8: debug queries

Seems like this has changed in the newest typo3 version, so I created a static function in my DebugService: public static function debugQuery($query){ $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(‘TYPO3\\CMS\\Extbase\\Object\\ObjectManager’); $queryParser = $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()); }