Review main Merged

89384[TASK] Avoid deserialization of undefined property in LazyObjectStorage

Oliver Hader CR +2 V +2 Easy +13 −2 updated 05/14/25, 12:53

Commit message

Deserializing an elderly string to LazyObjectStorage, that still
contains a removed/refactored property would lead to a PHP warning:

Creation of dynamic property LazyObjectStorage::$undefined is deprecated

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Oliver Klee +1
    • Benni Mack +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Benni Mack +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1213

  1. Oliver Hader uploaded patch set 1 05/14/25, 07:34

  2. Benni Mack commented on patch set 1 05/14/25, 07:37

    thank you! It would be good to have a tiny unit test for it (thus, any refactoring ensures that this is kept). And; Should we mark it as Bugfix?
  3. core-ci voted on patch set 1 V +1 05/14/25, 07:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/78894

  4. Oliver Hader commented on patch set 1 05/14/25, 07:41

    Reply

    Marking it as `[BUGFIX]` would be fine. Do you see other test-cases that the new one in `LazyObjectStorageTest` I've added in the 1st patch-set?
  5. Benni Mack commented on patch set 1 CR +1 V +1 05/14/25, 07:56

    yes. sry!
  6. Mathias Brodala commented on patch set 1 05/14/25, 07:59

    What is the exact issue? The "undefined" mentioned here sounds like an example/placeholder. What property exactly was removed that could cause this?
  7. Oliver Klee voted on patch set 1 CR +1 05/14/25, 08:15

  8. Oliver Hader commented on patch set 1 05/14/25, 08:27

    Reply

    `$undefined` is a placeholder for possible future refactoring or old serialized data that fiddled around with dynamic properties in user-land code. This change hardens deserialization to just use actually available properties.
  9. Mathias Brodala commented on patch set 1 05/14/25, 08:36

    Reply

    Acknowledged
  10. Simon Schaufelberger voted on patch set 1 CR +1 V +1 05/14/25, 09:16

  11. Oli Bartsch voted on patch set 1 CR +1 V +1 05/14/25, 12:52

  12. Oli Bartsch voted on patch set 1 CR +2 V +2 05/14/25, 12:53

  13. Oli Bartsch merged patch set 2 05/14/25, 12:53