89710[BUGFIX] Let AbstractListTypeToCTypeUpdate wizard handle edge cases
Commit message
Review
-
Code review CR +2 Done
- Garvin Hicking +2
- Oli Bartsch +1
- Torben Hansen +1
- Stefan Bürk +1
-
Verified V +2 Done
- Garvin Hicking +2
- Oli Bartsch +1
- Torben Hansen +1
- Stefan Bürk +1
- core-ci +1 CI
Issues 3
Files 11
- Build/phpstan/phpstan-baseline.neon+1 −1
- typo3/sysext/install/Classes/Updates/AbstractListTypeToCTypeUpdate.php3+40 −12
- typo3/sysext/install/Tests/Functional/Updates/Fixtures/CustomCTypeMigration.phpnew+49 −0
- typo3/sysext/install/Tests/Functional/Updates/Fixtures/CustomCTypeMigrationBase.csvnew+21 −0
- typo3/sysext/install/Tests/Functional/Updates/Fixtures/CustomCTypeMigrationBasePartiallyMigration.csvnew+21 −0
- typo3/sysext/install/Tests/Functional/Updates/Fixtures/CustomCTypeMigrationMigrated.csvnew+21 −0
- typo3/sysext/install/Tests/Functional/Updates/Fixtures/CustomCTypeMigrationPartiallyMigrated.csvnew+21 −0
- typo3/sysext/install/Tests/Functional/Updates/Fixtures/InvalidCustomCTypeMigrationEmptyArrayKey.phpnew+46 −0
- typo3/sysext/install/Tests/Functional/Updates/Fixtures/InvalidCustomCTypeMigrationEmptyArrayValue.phpnew+48 −0
- typo3/sysext/install/Tests/Functional/Updates/CustomCTypeMigrationTest.phpnew+90 −0
- typo3/sysext/install/Tests/Functional/Updates/InvalidCustomCTypeMigrationTest.phpnew+48 −0
Review log 2025
-
Garvin Hicking uploaded patch set 1 06/12/25, 07:29
-
Garvin Hicking commented on patch set 1 CR -1 06/12/25, 07:32
Working on tests to verify the fix, indexedsearch_pi2 migration is not suitable here -
core-ci voted on patch set 1 V -1 06/12/25, 07:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/80235
-
Garvin Hicking uploaded patch set 2
CR -1V -106/12/25, 08:17 -
core-ci voted on patch set 2 V -1 06/12/25, 08:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/80237
-
Garvin Hicking uploaded patch set 3
V -106/12/25, 08:51 -
core-ci voted on patch set 3 V -1 06/12/25, 08:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/80238
-
Franz Holzinger commented on patch set 3 06/12/25, 09:03
The Exception messages should be improved and add the title of the specific upgrade wizard: $this->getTitle() -
Garvin Hicking marked it work in progress 06/12/25, 09:15
-
Garvin Hicking marked it ready for review 06/13/25, 07:25
-
Garvin Hicking uploaded patch set 4
V -106/13/25, 07:25 -
core-ci voted on patch set 4 V +1 06/13/25, 07:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/80275
-
Franz Holzinger commented on patch set 4 CR -1 06/13/25, 09:48
"'someoldplugin_pi2' => 'somenewplugin_pi2'," This is wrong. The plugin remains the same. There is no new plugin. It is just a conversion of from list_type to CType of the same plugin as before. -
Garvin Hicking commented on patch set 4 06/13/25, 10:21
Reply
I think the classnameReply
No, this is alright. You can actually rename plugins, this is a "feature" the migration wizard supports. But extension authors of course then need to register the "new name". -
Garvin Hicking commented on patch set 4 06/13/25, 10:22
Reply
(otherwise the array would not need a key->value mapping but only a value) -
Stefan Bürk commented on patch set 4 06/13/25, 11:44
Reply
> "'someoldplugin_pi2' => 'somenewplugin_pi2'," > > This is wrong. The plugin remains the same. There is no new plugin. It is just a > conversion of from list_type to CType of the same plugin as before. Maybe in your use-case that is not needed. I can tell you that we took the oppurtunity to migrate list_type to CType to also rename plugins in projecets and even projects. As we already doing that in v11 or v12 we used a own upgrade wizard for that (special in public extensions) instead of using the TYPO3 shipped one. And that more than one time, so it's a legit assumption. If it does not change simply use the same value on left and right side (old list_type => new CType). Beside that, I'm curious why you put a -1 on it and saying that is wrong, as this is exactly what is required to fix the issue reported by you in #106870 to rename from old "list_type (int)1" to "new CType (string)some_plugin_name". Can you please reconsider and rethink your opionion on that and remove the -1, please ? -
Stefan Bürk commented on patch set 4 06/13/25, 11:52
AbstractListTypeToCTypeUpdate.php:242I'd would personally drop the `getContentElementsToUpdate()` method completly and rework the update command. Currently, all "records" are selected and returned (one roundtrip), iterated and for each element a update command triggerd (count elements extra roundtrips per update query). That means, memory consumption is here also an issue. Even worser, getContentElements() did not returned the result set which keeps items until fetchin outside the php memory scope (limit) but instead fetched all seceted items and passed it as array (consuming the memory for all records). Update is here done using simply plain update query, not using DataHandler and therefor skipng audit logs (record change history) anyway and could be reworked to dispatch one update query to update all content elements of old list_type to new CType in one updatae query (1 sql query roundtrip instead of eventually hundred or thousands or more). I know, unrelated to that change. @garvin@hick.ing do you think it would make sense to consider that here too as we are now on the abstract and changeing stuff ? -
Garvin Hicking commented on patch set 4 06/13/25, 17:13
AbstractListTypeToCTypeUpdate.php:242ReplyI do think that would be an approach worth to discuss. But I'd rsther like to approach this in its own follow-up patch. Then we would have tests in place and the review of both this, and the follow-up patch would be easier. We also need to think if that could break existing implementations of the abstract, I wouldn't want to enforce the "protected method = internal" policy here to not annoy third parties. I already am not a fan that this patch here fixes two issues at once, but separating that would be time consuming and possibly harder to wrap up quickly. Would you be okay to leave it at "just" fixing the teo bugs here? -
Oli Bartsch uploaded patch set 5
CR -1V +106/23/25, 08:22 -
Oli Bartsch commented on patch set 5 CR +1 V +1 06/23/25, 08:23
Reply
Like already mentioned, all ways are supported "old" => "new" as well as "old" to "old", see corresponding tests.AbstractListTypeToCTypeUpdate.php:242ReplyYes, let's get this in as is. -
core-ci voted on patch set 5 V +1 06/23/25, 08:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/80578
-
Stefan Bürk voted on patch set 5 CR +1 V +1 06/23/25, 08:47
-
Garvin Hicking voted on patch set 5 CR +2 V +2 06/23/25, 08:48
-
Torben Hansen voted on patch set 5 CR +1 V +1 06/23/25, 08:50
-
Garvin Hicking merged patch set 6 06/23/25, 09:01