96825[!!!][TASK] Use __serialize() and __unserialize() instead of __sleep()
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Georg Ringer +1
- Wouter Wolters +1
- Alexander Schnitzler +1
-
Verified V +2 Done
- Benni Mack +2
- Georg Ringer +1
- Wouter Wolters +1
- Alexander Schnitzler +1
- core-ci +1 CI
Issues 1
Files 17
- typo3/sysext/core/Classes/Log/Logger.php+5 −4
- typo3/sysext/core/Classes/Resource/FileReference.php+8 −7
- typo3/sysext/core/Classes/Security/BlockSerializationTrait.php+1 −1
- typo3/sysext/core/Classes/Serializer/DenyListDeserializer.php+13 −12
- typo3/sysext/core/Configuration/DefaultConfiguration.php+2 −2
- typo3/sysext/core/Documentation/Changelog/15.0/Breaking-108285-SerializeAndUnserializeMagicMethods.rstnew+97 −0
- typo3/sysext/core/Tests/Functional/Resource/FileReferenceTest.php+25 −0
- typo3/sysext/core/Tests/Functional/Serializer/Fixtures/ClassWithUnserialize.phpnew+23 −0
- typo3/sysext/core/Tests/Functional/Serializer/DenyListDeserializerTest.php+12 −2
- typo3/sysext/core/Tests/Unit/Log/LoggerTest.php+34 −0
- typo3/sysext/extbase/Classes/Persistence/Generic/Query.php+20 −4
- typo3/sysext/extbase/Classes/Persistence/Generic/QueryResult.php+5 −4
- typo3/sysext/extbase/Classes/Persistence/Generic/Typo3QuerySettings.php+17 −10
- typo3/sysext/extbase/Classes/Reflection/ReflectionService.php+2 −2
- typo3/sysext/form/Classes/Domain/Finishers/FinisherVariableProvider.php+7 −4
- typo3/sysext/form/Classes/Mvc/Property/TypeConverter/PseudoFileReference.php+9 −23
- typo3/sysext/form/Tests/Functional/Mvc/Property/TypeConverter/PseudoFileReferenceTest.phpnew+111 −0
Review log 89
-
Benni Mack uploaded patch set 1 10/18/26, 14:49
-
core-ci voted on patch set 1 V +1 10/18/26, 14:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111536
-
Benni Mack marked it ready for review 10/18/26, 16:24
-
Wouter Wolters voted on patch set 1 CR +1 V +1 10/18/26, 20:29
-
Alexander Schnitzler voted on patch set 1 CR +1 V +1 10/20/26, 07:26
-
Alexander Schnitzler commented on patch set 1 10/20/26, 07:27
Thanks, looks good to me. All remaining __sleep()/__wakeup() in Core are gone. The new tests fail without the production change (PseudoFileReferenceTest, DenyListDeserializerTest::classWithUnserializeIsBlocked), so they really cover the regression from the native lazy objects change and the new deny rule. 1) Wording: PHP 8.5 only soft-deprecates __sleep()/__wakeup() (UPGRADING: "have been soft-deprecated", no E_DEPRECATED is emitted). Please say "soft-deprecates" in the commit message and the RST, otherwise readers expect deprecation notices on 13.4/14.3 and ask for backports. 2) Optional: Logger is allowed in the deserializer exactly for old payloads (scheduler tasks), but Logger::__unserialize() does not read the name from data written by the former __sleep(), which carries the mangled key "\0*\0name": - $this->name = (string)($data['name'] ?? ''); + $this->name = (string)($data['name'] ?? $data["\0*\0name"] ?? ''); 3) Optional (RST): the migration example names Extbase models as the main case but does not call parent::__serialize()/__unserialize(). Applied to an entity as is, uid/pid would be lost. A hint or a second example would help. -
Georg Ringer voted on patch set 1 CR +1 V +1 10/22/26, 20:49
-
Benni Mack voted on patch set 1 CR +2 V +2 10/23/26, 05:05
-
Benni Mack merged patch set 2 10/23/26, 05:06