Review main Merged

94939[BUGFIX] Handle unknown extension list records

Stefan Bürk CR +2 V +2 Normal +143 −5 updated 07/27/26, 07:40

Commit message

Freeing table `tx_extensionmanager_domain_model_extension`
from TCA replaced the Extbase mapped `Extension` argument of
several Extension Manager actions by a plain integer uid,
which is resolved through `ExtensionRepository::findByUid()`.
That method is declared nullable, but none of the call sites
handles a missing record:

* `DownloadController::checkDependenciesAction()`
* `DownloadController::installFromTerAction()`
* `DownloadController::checkDistributionDependenciesAction()`
* `DownloadController::installDistributionAction()`
* `DistributionController::showAction()`

These records are not stable. `BulkExtensionRepositoryWriter`
drops all records of a remote on import and bulk inserts the
parsed list again, so every extension list update assigns new
identifiers. A view rendered before such an update carries
uids which do not resolve anymore, and the actions then run
into a `TypeError` or a null property access. Both are
`\Error` and thus not covered by the surrounding
`catch (\Exception)`, ending in a fatal error.

`ExtensionRepository::getByUid()` is added as the throwing
counterpart of `findByUid()`, raising the new
`ExtensionNotFoundException` with a message pointing to the
outdated extension list. The affected actions use it now,
turning the fatal error into a controlled and speaking one.

Functional tests for the repository method and for the
dependency check action are added.

Review

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

Issues 3

Files 6

Review log 912

  1. Stefan Bürk uploaded patch set 1 07/24/26, 20:53

  2. core-ci voted on patch set 1 V +1 07/24/26, 21:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105358

  3. Stefan Bürk rebased onto patch set 2 V +1 07/24/26, 22:00

  4. core-ci voted on patch set 2 V +1 07/24/26, 22:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105361

  5. Stefan Bürk rebased onto patch set 3 V +1 07/26/26, 10:07

  6. core-ci voted on patch set 3 V +1 07/26/26, 10:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105416

  7. Oliver Klee voted on patch set 3 V +1 07/26/26, 12:30

  8. Benni Mack commented on patch set 3 CR +1 V +1 07/26/26, 15:12

    I actually planned to avoid the UID part completely in a change that was reverted last month, but will defer to this, we can add this change of yours now and then get rid of referencing the UID completely at a later step.
  9. Stefan Bürk commented on patch set 3 07/26/26, 22:38

    Reply

    I would feel better to have it fixed first, even if it is changed 1 day later again. Just in case the rework takes longer.
  10. Garvin Hicking voted on patch set 3 CR +1 V +1 07/27/26, 05:28

  11. Stefan Bürk voted on patch set 3 CR +2 V +2 07/27/26, 07:40

  12. Stefan Bürk merged patch set 4 07/27/26, 07:40