Commit cc462e9d authored by Christian Kuhn's avatar Christian Kuhn Committed by Helmut Hummel
Browse files

[TASK] Deprecate AbstractDomainObject::__wakeup and document changes

Resolves: #67402
Related: #66473
Releases: master
Change-Id: I4a493bd778b2fefdc39fbd7783f406d3fbbebabb
Reviewed-on: http://review.typo3.org/40245


Reviewed-by: Frank Nägler's avatarFrank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler's avatarFrank Nägler <frank.naegler@typo3.org>
Reviewed-by: default avatarHelmut Hummel <helmut.hummel@typo3.org>
Tested-by: default avatarHelmut Hummel <helmut.hummel@typo3.org>
parent 38c9eaba
================================================================
Breaking: #67402 - Extbase AbstractDomainObject initializeObject
================================================================
Description
===========
Method ``initializeObject()`` has been removed from ``TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject``.
Impact
======
Possible fatal error in Extbase if objects are thawed from persistence.
Affected Installations
======================
Domain objects extending AbstractDomainObject and calling ``parent::initializeObject()``.
This is relatively unlikely since the default implementation of ``initializeObject()`` is empty.
Migration
=========
Remove calls to ``parent::initializeObject()`` from own ``initializeObject()`` implementations.
==========================================================
Breaking: #67402 - Extbase AbstractDomainObject __wakeup()
==========================================================
Description
===========
Method ``__wakeup()`` in classes extending ``TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject``
is no longer called if objects are created when fetched from persistence.
Affected Installations
======================
An instance is affected if own domain objects extending AbstractDomainObject
implement own ``__wakeup()`` methods. Those methods are no longer called.
Migration
=========
Move initialization code from ``__wakeup()`` to ``initializeObject()``. As bonus, dependency
injection was executed at this time already.
=============================================================
Deprecation: #67402 - Extbase AbstractDomainObject __wakeup()
=============================================================
Description
===========
Method ``__wakeup()`` has been deprecated in ``TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject``.
Affected Installations
======================
An instance is affected if own domain objects extending AbstractDomainObject
implement ``__wakeup()`` and call ``parent::__wakeup()`` as documented.
Migration
=========
Remove calls to ``parent::__wakeup()`` from own ``__wakeup()`` implementations.
......@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Extbase\DomainObject;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
* A generic Domain Object.
*
......@@ -64,12 +66,10 @@ abstract class AbstractDomainObject implements DomainObjectInterface, \TYPO3\CMS
* parent::__wakeup() first!
*
* @return void
* @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8. Objects are instantiated differently calling parent::__wakeup() is no longer necessary.
*/
public function __wakeup() {
$this->initializeObject();
}
public function initializeObject() {
GeneralUtility::logDeprecatedFunction();
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment