Feature: #100089 - Introduce Doctrine DBAL v3 driver middlewares¶
Since v3, Doctrine DBAL supports adding custom driver middlewares. These
middlewares act as a decorator around the actual
Result components can be
decorated as well. These middlewares must implement the
A common use case would be a middleware for implementing SQL logging capabilities.
For more information on driver middlewares,
Furthermore, you can look up the implementation of the
\TYPO3\CMS\Adminpanel\Log\DoctrineSqlLoggingMiddleware in ext:adminpanel
as an example.
Registering a new driver middleware¶
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['driverMiddlewares']['adminpanel_loggingmiddleware'] = \TYPO3\CMS\Adminpanel\Log\DoctrineSqlLoggingMiddleware::class;
Using custom middlewares allows to enhance the functionality of Doctrine components.