Review main Merged

82069[FEATURE] Introduce sortable Doctrine DBAL middleware registration

Stefan Bürk CR +2 V +2 Hard +449 −25 updated 12/08/23, 12:30

Commit message

Doctrine DBAL supports driver middlewares to decorate
drivers as a method to enhance the implementation.

TYPO3 integrated connection middlewares with #100089 and
global driver middlewares with #102496 using a simple
`identifier => class-name` approach. This approach is not
useful for a proper before/after configuration, and array
operation like `unset()` should be omitted at all costs.

This change introduces now a sortable driver middleware
registration, similar to PSR-15 middleware configuration.
The ordering is processed after middleware configurations
from global and connection are combined.

Registered Doctrine DBAL driver middlewares are now also
listed in the `ext:lowlevel` configuration module overview.

The `identifier => class-name` approach is deprecated and
will be promoted to a full exception with v14.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1
    • Benni Mack +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • Christian Kuhn +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 3

Files 11

Review log 1421

  1. Stefan Bürk uploaded patch set 1 12/02/23, 20:08

  2. Stefan Bürk wrote 12/02/23, 20:09

    Topic set to doctrine-dbal
  3. Stefan Bürk uploaded patch set 2 12/02/23, 20:10

  4. core-ci voted on patch set 1 V +1 12/02/23, 20:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50252

  5. core-ci voted on patch set 2 V +1 12/02/23, 20:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50253

  6. Stefan Bürk uploaded patch set 3 V +1 12/02/23, 22:43

  7. core-ci voted on patch set 3 V +1 12/02/23, 22:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50254

  8. Stefan Bürk uploaded patch set 4 12/03/23, 02:46

    Copied Votes: * Verified+1 (copy condition: "**changekind:NO_CHANGE**")
  9. core-ci voted on patch set 4 V +1 12/03/23, 02:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50261

  10. core-ci commented on patch set 4 12/03/23, 04:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50266

  11. Stefan Bürk uploaded patch set 5 V +1 12/03/23, 12:21

  12. core-ci voted on patch set 5 V +1 12/03/23, 12:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50276

  13. Oliver Klee voted on patch set 5 V +1 12/03/23, 14:36

  14. Benni Mack commented on patch set 5 CR +1 V +1 12/06/23, 09:38

    As mentioned, I suggest to move the middleware registration into custom "middleware stacks" which is breaking. Basically a new registration: Configuration/DoctrineMiddlewares.php where you have a "global" middleware, but also any arbritrary name such as "benni", as keyword. In TYPO3_CONF_VARS. A connection can then define which middleware to use. Why? Since we use DependencyOrderingservice, I would like to have this ordering within the DI setup, and not on every request. However, this can be dealt with separately, so this is fine for the time being.
  15. Benni Mack updated the commit message in patch set 6 CR +1 V +1 12/08/23, 06:57

  16. Benni Mack voted on patch set 6 CR +1 V +1 12/08/23, 06:57

  17. core-ci voted on patch set 6 V +1 12/08/23, 07:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50471

  18. Oliver Klee voted on patch set 6 V +1 12/08/23, 09:47

  19. Christian Kuhn voted on patch set 6 CR +1 V +1 12/08/23, 10:18

  20. Stefan Bürk voted on patch set 6 CR +2 V +2 12/08/23, 12:30

  21. Stefan Bürk merged patch set 7 12/08/23, 12:30