Skip to content
Snippets Groups Projects
Commit 43f3d096 authored by Stefan Bürk's avatar Stefan Bürk
Browse files

[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: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent 89cbefc9
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment