Project

General

Profile

Actions

Bug #88613

open

Replace ObjectStorage & LazyObjectStorage with symfony/collection

Added by Oliver Hader over 5 years ago. Updated almost 2 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2019-06-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

For regular ObjectStorage deserialization most probably would work - however there are inconsitencies concerning object integrity due to ObjectStorage using spl_object_hash() internally. In a result it would not be possible to detach an object retrieved from repository from some deserialized ObjectStorage - basically uid should be used as identifier here which would turn ObjectStorage into EntityStorage. So, we could live with serialization of ObjectStorage.

For LazyObjectStorage things are getting more difficult since serialization of it would mean to serialize backreferences to parent object as well as DataMapper state, ObjectManager state and in the end class Reflection state - that turns out to be a massive collection of serialized data.

Thus, we experience most pain with LazyObjectStorage and its current implementation.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #91387: Relax constraints on serializing objectsClosedOliver Hader2020-05-13

Actions
Actions #1

Updated by Gerrit Code Review over 5 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61118

Actions #2

Updated by Gerrit Code Review over 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61118

Actions #3

Updated by Gerrit Code Review over 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61118

Actions #4

Updated by Oliver Hader over 5 years ago

  • Description updated (diff)
Actions #5

Updated by Oliver Hader over 5 years ago

@Alexander Schnitzler (https://review.typo3.org/c/Packages/TYPO3.CMS/+/61118/3#message-e5ec8c4a56d55a65395753969b7d240c8effc6cb)

I am planning to replace our ObjectStorage with doctrine/collection anyway. That also means, that our Lazy-Objects won't be used any more. The Collection also doesn't have any services injected, its state is handled from the outside. So, if we don't have issues with people trying to serialize their object storages at the moment, I'd say, let's abandon this patch and work on a better implementation.

Actions #6

Updated by Oliver Hader over 5 years ago

  • Subject changed from Properly deny serialization of Extbase object storage to Substitute ObjectStorage & LazyObjectStorage with symfony/collection
  • Status changed from Under Review to Accepted
Actions #7

Updated by Oliver Hader over 5 years ago

  • Subject changed from Substitute ObjectStorage & LazyObjectStorage with symfony/collection to Replace ObjectStorage & LazyObjectStorage with symfony/collection
Actions #8

Updated by Alexander Schnitzler over 4 years ago

  • Priority changed from Should have to Won't have this time

This will not make it into 10. The change is quite invasive as it forces users to touch their code. The mere inner representation of collections is not so much the issue but at the moment, ObjectStorage's are very exposed in the public api. They are even used as identifier in annotations and therefore pretty much bind the concrete class to the user land code.

Actions #9

Updated by Oliver Hader over 4 years ago

  • Related to Bug #91387: Relax constraints on serializing objects added
Actions #10

Updated by Christian Kuhn almost 2 years ago

  • Status changed from Accepted to Closed

Hey.
I hope it's ok to close here for now: The initial patch has been abandoned and nothing happened for some years.
I hope it's fair to create a fresh issue in case work is continued here.

Actions #11

Updated by Oliver Hader almost 2 years ago

  • Status changed from Closed to New
  • Priority changed from Won't have this time to Should have

Hey, I hope it's okay to reopen this issue again, since the pain points of the lazy object storage still seem to be existing and this issue provided a potential path to solve it.

Actions

Also available in: Atom PDF