90417[TASK] Replace deprecated `SplObjectStorage` method calls
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Garvin Hicking +1
- Benni Mack +1
-
Verified V +2 Done
- Stefan Bürk +2
- Garvin Hicking +1
- Benni Mack +1
- core-ci +1 CI
Issues 1
Files 14
- typo3/sysext/adminpanel/Classes/ModuleApi/ModuleDataStorageCollection.php+1 −1
- typo3/sysext/adminpanel/Classes/ViewHelpers/SubModuleRenderViewHelper.php+1 −1
- typo3/sysext/extbase/Classes/Validation/Validator/AbstractCompositeValidator.php+3 −3
- typo3/sysext/extbase/Classes/Validation/Validator/AbstractGenericObjectValidator.php+3 −3
- typo3/sysext/extbase/Tests/Functional/Validation/Validator/ConjunctionValidatorTest.php+3 −3
- typo3/sysext/extbase/Tests/Functional/Validation/Validator/NotEmptyValidatorTest.php+1 −1
- typo3/sysext/extbase/Tests/Unit/Mvc/View/JsonViewTest.php+1 −1
- typo3/sysext/extbase/Tests/Unit/Reflection/ObjectAccessTest.php+2 −2
- typo3/sysext/extbase/Tests/Unit/Validation/Validator/GenericObjectValidatorTest.php+3 −3
- typo3/sysext/extensionmanager/Classes/Domain/Model/Extension.php+2 −2
- typo3/sysext/extensionmanager/Tests/Unit/Domain/Repository/ExtensionRepositoryTest.php+4 −4
- typo3/sysext/extensionmanager/Tests/Unit/Utility/DependencyUtilityTest.php+12 −12
- typo3/sysext/form/Classes/Mvc/ProcessingRule.php+1 −1
- typo3/sysext/form/Tests/Unit/Mvc/Property/PropertyMappingConfigurationTest.php+2 −2
Review log 1822
-
Stefan Bürk uploaded patch set 1 08/16/25, 12:52
-
Stefan Bürk updated the commit message in patch set 2 08/16/25, 12:59
-
core-ci voted on patch set 1 V +1 08/16/25, 13:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83492
-
Stefan Bürk updated the commit message in patch set 3 08/16/25, 13:02
-
core-ci voted on patch set 2 V +1 08/16/25, 13:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83494
-
core-ci voted on patch set 3 V +1 08/16/25, 13:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83496
-
Simon Schaufelberger voted on patch set 3 CR +1 V +1 08/17/25, 06:24
-
Oliver Klee voted on patch set 3 CR +1 V +1 08/17/25, 07:53
-
Christian Kuhn voted on patch set 3 CR +1 V +1 08/17/25, 10:22
-
Garvin Hicking commented on patch set 3 08/17/25, 19:08
So "luckily" our Extbase ObjectStorage has its own implementations of attach/detach/contains which continue to work without deprecations. However, can you say if this place is unaffected? I assume rector may not fully infer the classes there: * `typo3/sysext/adminpanel/Classes/ViewHelpers/SubModuleRenderViewHelper.php` -> ` $moduleData = $data->contains($module) ? $data->offsetGet($module) : new ModuleData();` I found no other occurrences that matched "->(contains|detach|attach)\(" and were not an ObjectStorage. -
Stefan Bürk commented on patch set 3 CR -2 08/17/25, 22:31
Reply
Extbase ObjectStorage is not extending PHP `SplObjectStorage`, and also not using it internal. That means, that this is absolutly unrelated to the Extbase `ObjectStorage` or `LazyObjectStorage` implementation. The implementation is a userland implementation of the SplObjectStorage, which was back then not ensured in casual installations (optional) and to remove the serializbe interface implementation. See also phpdocblock of the ObjectStorage implementation: ``` * The storage for objects. It ensures the uniqueness of an object in the storage. * It's a remake of the `SplObjectStorage` introduced in PHP 5.3. * * Opposed to the `SplObjectStorage`, the `ObjectStorage` does not implement * the `Serializable` interface. ``` That means, that the ObjectStorage is in no way affected by the PHP deprecation of `SplObjectStorage` implementation ... but the adjusted tests shows that this class call still be used for custom stuff in models, like it is done for example for `typo3/sysext/adminpanel/Classes/ModuleApi/ModuleDataStorageCollection.php` and `typo3/sysext/extensionmanager/Classes/Domain/Model/Extension.php`. > However, can you say if this place is unaffected? I assume rector may not fully infer the classes there: typo3/sysext/adminpanel/Classes/ViewHelpers/SubModuleRenderViewHelper.php -> $moduleData = $data->contains($module) ? $data->offsetGet($module) : new ModuleData(); Good catch! No, I cannot say that it is unaffected because it is affected. That means that this is not covered by tests at all. Not that of a rector pro, but I guess that the RenameMethodRector with MethodCallRename does not take classes extending provided classes into account. Putting -2 now on it to investigate this further. -
Garvin Hicking commented on patch set 3 08/18/25, 08:01
Reply
Yes I was just talking about that our ObjectStorage has the sams method names plus aliases plus similar methods, but is unaffected. Was just a note for maybe other reviewers wondering if it's affected. Thanks for checking. -
Christian Kuhn voted on patch set 3 CR 0 V 0 08/18/25, 09:28
-
Oliver Klee voted on patch set 3 CR 0 V 0 08/18/25, 09:32
-
Stefan Bürk uploaded patch set 4
CR +1V +109/02/25, 12:43Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
Stefan Bürk voted on patch set 4 CR 0 09/02/25, 12:49
-
core-ci voted on patch set 4 V +1 09/02/25, 12:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84247
-
Stefan Bürk commented on patch set 4 09/02/25, 12:56
Reply
Done -
Garvin Hicking voted on patch set 4 CR +1 V +1 09/02/25, 13:08
-
Benni Mack voted on patch set 4 CR +1 V +1 09/02/25, 15:13
-
Stefan Bürk voted on patch set 4 CR +2 V +2 09/02/25, 15:36
-
Stefan Bürk merged patch set 5 09/02/25, 15:36