Review 12.4 Merged

86476[BUGFIX] Fix AbstractFormViewHelper type hint for identity map

Garvin Hicking CR +2 V +2 Easy +2 −2 updated 10/08/24, 07:41

Commit message

With a larger refactoring of #96473 type hinting was introduced
for `AbstractFormViewHelper->renderHiddenIdentityField()`.

The phpdoc annotation previously hinted at the input being of
type 'object' (or null), and the type hint was thus set to
'object', too.

However, the argument restriction of a ViewHelper like
`FormViewHelper` defined an 'object' of type 'mixed',
and would thus allow arrays. Arrays do not need a
hidden identity field, so returning '' for that
would allow the ViewHelper to function properly.

With this patch, the type hint is changed to 'mixed'
now, so that previous ViewHelper usages with arrays
should be restored again and not lead to a type
exception.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
  • Verified V +2 Done
    • Garvin Hicking +2
    • core-ci +1 CI

Issues 3

Files 1

Review log 34

  1. Garvin Hicking commented on patch set 1 10/08/24, 07:28

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 10/08/24, 07:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67329

  3. Garvin Hicking voted on patch set 1 CR +2 V +2 10/08/24, 07:41

  4. Garvin Hicking merged patch set 2 10/08/24, 07:41