Review 13.4 Merged

89785[BUGFIX] Let AbstractListTypeToCTypeUpdate wizard handle edge cases

Garvin Hicking CR +2 V +2 Hard +406 −13 updated 06/23/25, 09:01

Commit message

Two bugs are fixed in the (abstract) migration wizard that converts
list_type plugins to CType (see #105076) which should mainly
effect edge cases:

1. Allow list_type elements with integer based keys
===================================================

PHP arrays defined like:

```
return [
  '1' => 'pi1_new',
  '2' => 'pi2_new',
];
```

will be handleded by PHP internally as having integer array keys.

Thus, the type checking and exception handling in later usages
will fail if such keys are used (like for extensions such as
EXT:tt_board).

The wizard now takes this into account.

2. Properly migrate be_groups.explicit_allowdeny when
   "old" name (list_type) does NOT match "new" name (CType)
===========================================================

The old code only could migrate the be_groups.explicit_allowdeny,
when CType and list_type were identical.

This is now fixed to properly take the "old" name into account.

Other changes:
==============

Tests are added to verify both behaviours with a new custom
migration implementation. The old "indexedsearch" based
migration only used the same key for CType and list_type,
and could not catch this scenario. Another test ensures
the `validateRequirements()` exceptions are thrown on
invalid configurations. The PHPStan baseline entry is removed
thanks to the removal of the unneeded narrowed check.

The exception message is enhanced to also contain the
name of the wizard for better identification.

Note though that for "readable" list_type names it is
common practice to have the CType be named the same,
and thus this bug should hopefully not affect too many
installations. Also, using integer keys for list_types
should not be broadly used (anymore).

Review

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

Issues 3

Files 11

Review log 34

  1. Garvin Hicking commented on patch set 1 06/23/25, 08:48

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 06/23/25, 08:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/80580

  3. Garvin Hicking voted on patch set 1 CR +2 V +2 06/23/25, 09:01

  4. Garvin Hicking merged patch set 2 06/23/25, 09:01