Review main Abandoned

86098[WIP][TASK] Migrate `tx_cms_showpic` eID handler to middleware

Stefan Bürk CR -2 V 0 Hard +329 −249 updated 09/06/25, 01:38

Commit message

The `eID` handler system dates back to the time `PSR-15`
middlewares where not a topic and TYPO3 needed to provide
extension authors a way to do request working before the
normal content rendering, which also required to do custom
bootstraps as most things are not build at that early time.
Going even more back in history that includec the way to
use dedicated scripts directly - which has been banned for
good already.

Since the introduction of the PSR-15 middleware stack using
`eID` handler became nearly obsolete and `eID` handler could
be replaced with a middleware.

This change transforms the old `eID` handler implementation
into a modern middleware still listening to the known and
created `?eID=tx_cms_showpic` url parameter for now.

The old eID handler `ShowImageController` is now unused
and due to marked as `@internal` removed directly.

Corresponding functional test has been moved to match the
change from eID to a middleware without changing existing
tests.

This is build as drop-in replacement reacting on the very
same request url structure before the eID Middleware and
considerable not breaking.

Additionally, this prepares also deprecating the whole
`eID` handler concept completly somewhere in the future.

Review

  • Code review CR -2
    • Stefan Bürk -2
  • Verified V 0
    • core-ci +1 CI

Issues 1

Files 5

Review log 1117

  1. Stefan Bürk uploaded patch set 1 09/15/24, 02:50

  2. core-ci voted on patch set 1 V -1 09/15/24, 02:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65779

  3. Stefan Bürk uploaded patch set 2 V -1 09/17/24, 10:41

  4. core-ci voted on patch set 2 V -1 09/17/24, 10:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65986

  5. Stefan Bürk uploaded patch set 3 V -1 09/17/24, 13:32

  6. core-ci voted on patch set 3 V -1 09/17/24, 13:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66024

  7. Stefan Bürk uploaded patch set 4 V -1 09/17/24, 17:25

  8. core-ci voted on patch set 4 V +1 09/17/24, 17:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66066

  9. Stefan Bürk uploaded patch set 5 V +1 09/17/24, 18:35

  10. core-ci voted on patch set 5 V +1 09/17/24, 18:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66069

  11. Benjamin Franzke commented on patch set 5 09/17/24, 19:55

    Hm… Middlewares were not meant to replace eIDs (we would have migrated them right away, if we wanted that). Parsing kind-of random routes in middlewares doesn't scale well IMO. I think we should rather try to introduce some kind of general frontend routing. (not just site-scoped, but globally scoped) Middlewares are good for encapsulation, and also helpful to create specific routes in extensions, as TYPO3 core provides no solution – but we as TYPO3 core should actualy think about a solution IMO, and not just apply this "hack" ourselves..
  12. Stefan Bürk commented on patch set 5 CR -2 09/17/24, 22:41

    Reply

    That makes literally sense for tx_cms_showpic and the other core eID which are designed to run early. However, a lot of developers out there simply move the EidHandler Middleware to a later point to have things like site, page or TSFE / TypoScript bootstrapped. It's scary to hear these things on camps and events. The thinking behind this change was to make it free while keeping "the" place and uri intact for now. But ack. Let's consider that in a bigger and correct concept.
  13. Stefan Bürk rebased onto patch set 6 V +1 09/19/24, 14:02

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  14. core-ci voted on patch set 6 V +1 09/19/24, 14:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66221

  15. Benjamin Franzke commented on patch set 6 09/19/24, 14:44

    Reply Unresolved

    > However, a lot of developers out there simply move the EidHandler Middleware to a later point to have things like site, page or TSFE / TypoScript bootstrapped. It's scary to hear these things on camps and events. thanks for the info, that's good to know – something we need to consider for global routes.
  16. Benni Mack marked it work in progress 04/09/25, 10:18

  17. Stefan Bürk abandoned the change 09/06/25, 01:38

    abanding for now. Needs another approach as it seems.