[FEATURE] Introduce driver middleware `UsableForConnectionInterface`
TYPO3 integrated the Doctrine DBAL Driver Middleware concept for connection (#100089) and all connections (#102496) along with a enhanced configuration ability (#102586). This change adds a specific driver middleware interface to TYPO3, which can be used to determine if a registered driver middleware can be used for a specific connection. `\TYPO3\CMS\Core\Database\Middleware\UsableForConnectionInterface` requires the implementation of following method to a custom driver middleware implementation if used: public function canBeUsedForConnection( string $identifier, array $connectionParams ): bool { ... } This allows extension authors to provide driver middlewares in a generic way, but ensure it is only taken into account if further requirements are met. Resolves: #102587 Related: #102586 Related: #102496 Related: #100089 Releases: main Change-Id: Idff667177a3bb55e9e00cfc7eaf2670101f0a548 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82070 Reviewed-by:Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Benni Mack <benni@typo3.org>
Showing
- typo3/sysext/core/Classes/Database/ConnectionPool.php 26 additions, 16 deletionstypo3/sysext/core/Classes/Database/ConnectionPool.php
- typo3/sysext/core/Classes/Database/Middleware/UsableForConnectionInterface.php 29 additions, 0 deletions...sses/Database/Middleware/UsableForConnectionInterface.php
- typo3/sysext/core/Documentation/Changelog/13.0/Feature-102587-IntroduceDriverMiddlewareInterfaceUsableForConnectionInterface.rst 123 additions, 0 deletions...DriverMiddlewareInterfaceUsableForConnectionInterface.rst
- typo3/sysext/core/Tests/Functional/Database/ConnectionPoolTest.php 55 additions, 0 deletions...ext/core/Tests/Functional/Database/ConnectionPoolTest.php
- typo3/sysext/core/Tests/Functional/Database/Fixtures/DriverMiddlewares/DropForConnectionNamedSecondTestDriverMiddleware.php 36 additions, 0 deletions...ares/DropForConnectionNamedSecondTestDriverMiddleware.php
Please register or sign in to comment