Bug #91398

Serialization of ObjectManager is broken

Added by Benjamin Franzke about 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Should have
Category:
-
Start date:
2020-05-14
Due date:
% Done:

100%

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

Description

This is broken in v10 since the introduction of dependency injection in:
https://review.typo3.org/c/Packages/TYPO3.CMS/+/58255

Using:

serialize($this->objectManager)

Results in the following exception:

(1/1) Exception
Serialization of 'Closure' is not allowed

Related issues

Related to TYPO3 Core - Bug #91196: Exception for FileUpload field in multi-step forms Resolved 2020-04-25

Associated revisions

Revision 2ce81ab6 (diff)
Added by Benjamin Franzke about 2 months ago

[BUGFIX] Fix serialization of ObjectManager

The PSR-11 container instance was not cleared upon serialization which
caused an exception when Closures in the container where tried to be
serialized.

__wakeup() does already contain code to reset the container instance,
therefore we only need to clear the entire object manager properties
in __sleep().

Releases: master
Resolves: #91398
Related: #88689
Change-Id: I58202752577b58cd882d13f471af1e045c9a4187
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64489
Tested-by: TYPO3com <>
Tested-by: Alexander Schnitzler <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Alexander Schnitzler <>
Reviewed-by: Oliver Hader <>
Reviewed-by: Susanne Moog <>
Reviewed-by: Andreas Fernandez <>

History

#1 Updated by Gerrit Code Review about 2 months 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/+/64489

#2 Updated by Gerrit Code Review about 2 months 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/+/64489

#3 Updated by Oliver Hader about 2 months ago

  • Related to Bug #91196: Exception for FileUpload field in multi-step forms added

#4 Updated by Benjamin Franzke about 2 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#5 Updated by Benni Mack about 2 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF