95171[BUGFIX] Store language pack state in JSON file
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Georg Ringer +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Stefan Bürk +2
- Georg Ringer +1
- Oliver Klee +1
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 1
Files 6
- typo3/sysext/core/Classes/Command/UpdateLanguagePackCommand.php+32 −28
- typo3/sysext/core/Classes/Localization/LanguagePackService.php+27 −10
- typo3/sysext/core/Classes/Localization/LanguagePackStatesStore.php14new+160 −0
- typo3/sysext/core/Classes/Upgrades/LanguagePackUpdateTimestampMigration.phpnew+142 −0
- typo3/sysext/core/Documentation/Changelog/14.3.x/Important-110385-LanguagePackStateNowStoredInJSONFile.rstnew+34 −0
- typo3/sysext/core/Tests/Unit/Localization/LanguagePackStatesStoreTest.phpnew+177 −0
Review log 1721
-
Andreas Kienast uploaded patch set 1 08/07/26, 20:11
-
core-ci voted on patch set 1 V +1 08/07/26, 20:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106139
-
Garvin Hicking commented on patch set 1 08/07/26, 22:02
LanguagePackStatesStore.php:25Internal API?LanguagePackStatesStore.php:71Just curiosity, is this needed due to destruct usage or why is it a static methkd? -
Andreas Kienast commented on patch set 1 08/08/26, 04:54
LanguagePackStatesStore.php:24ReplyI do not agree here. `LanguagePackStore` would handle the language packs. `LanguagePackStates` would represent the JSON file as a DTO.LanguagePackStatesStore.php:25ReplyAcknowledgedLanguagePackStatesStore.php:71ReplyIt's static because everything else in this method is static. -
Andreas Kienast uploaded patch set 2
V +108/08/26, 04:54 -
core-ci voted on patch set 2 V +1 08/08/26, 05:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106159
-
Garvin Hicking commented on patch set 2 CR +1 08/08/26, 07:04
LanguagePackStatesStore.php:24ReplyAck. Filed under "naming things" ;)LanguagePackStatesStore.php:71ReplyAcknowledged -
Mathias Brodala commented on patch set 2 08/10/26, 06:41
I'd love to have an Important RST for this which clarifies the implication for the suggested workflow to have var/labels in VCS instead of updating it at runtime/deploy. -
Andreas Kienast commented on patch set 2 08/10/26, 08:24
Reply
I think there is a misunderstanding: this patch does not suggest/recommend a workflow, but fixes side-effects when using the language update in a specific context. An Important.rst makes perfectly sense to highlight that change, tho. -
Andreas Kienast uploaded patch set 3
CR +1V +108/12/26, 12:19 -
core-ci voted on patch set 3 V +1 08/12/26, 12:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106535
-
Stefan Bürk commented on patch set 3 08/13/26, 18:59
LanguagePackStatesStore.php:29This store (service) is not concurrent safe, for example dispatching multiple requests for different packs simulatnously in the UI ( backend/install tool) - and also together with possible parallel from the cli (scheduler command, cronjob). I'm not sure if the "load" -> internal state (propert) -> persist (load reads file only onces, and possible dropping other things later written meanwhile). I guess we should have here at least a "nearly" scoped `lock(wait) -> read -> update" loop - or at least on persiting the "file" should be locked, read, data merged / updated and written together -> unlock" as minimu. I guess this needs a deeper look, what do you think @akienast@scripting-base.de ?LanguagePackStatesStore.php:35Destruct is not really optimal for functional tests (we stumpeled upn that recently in other place(s) and was hard to debug and find. Not sure if we really should rely on that here. Beside that, I do not think that this "store" in that setup is really reliable, see generic / class comment.LanguagePackStatesStore.php:71With this condition, persists() only writes the file/content when it has already loaded something from the file OR this class has added something meanwhile. The condition is not really expressive on that double roule when to persist, and possible adding a comment here helps others on review or when coming back in the future. -
Andreas Kienast uploaded patch set 4
V +108/26/26, 09:59 -
Andreas Kienast commented on patch set 4 08/26/26, 10:01
Reply
DoneLanguagePackStatesStore.php:29ReplyDoneLanguagePackStatesStore.php:35ReplyDoneLanguagePackStatesStore.php:71ReplyDone -
core-ci voted on patch set 4 V +1 08/26/26, 10:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107132
-
Stefan Bürk voted on patch set 4 CR +1 V +1 09/02/26, 10:49
-
Oliver Klee voted on patch set 4 V +1 09/02/26, 11:09
-
Simon Schaufelberger voted on patch set 4 CR +1 V +1 09/02/26, 18:36
-
Georg Ringer voted on patch set 4 CR +1 V +1 09/03/26, 19:18
-
Stefan Bürk voted on patch set 4 CR +2 V +2 09/03/26, 19:23
-
Stefan Bürk merged patch set 5 09/03/26, 19:47
LanguagePackStatesStore.php:24