[TASK] Document DI happening before initializeObject() 95/40195/3
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Thu, 11 Jun 2015 17:00:54 +0000 (19:00 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Fri, 12 Jun 2015 09:41:45 +0000 (11:41 +0200)
Changes in the execution of dependency injection and object
initialization have been documented as an important change.

Resolves: #67401
Related: #67274
Related: #67272
Related: #66473
Releases: master
Change-Id: Iab0cb89d7ed77ceaeafb1f87b19b750f73f45eda
Reviewed-on: http://review.typo3.org/40195
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: Mathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/core/Documentation/Changelog/master/Important-67401-DependencyInjectionIsNowDoneBeforeInitializeObject.rst [new file with mode: 0644]

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Important-67401-DependencyInjectionIsNowDoneBeforeInitializeObject.rst b/typo3/sysext/core/Documentation/Changelog/master/Important-67401-DependencyInjectionIsNowDoneBeforeInitializeObject.rst
new file mode 100644 (file)
index 0000000..274bda0
--- /dev/null
@@ -0,0 +1,14 @@
+==============================================================================
+Important: #67401 - Dependency Injection is now done before initializeObject()
+==============================================================================
+
+Description
+===========
+
+Formerly ``initializeObject()`` was called before the dependencies were injected. This behavior didn't match the documentation_.
+
+With TYPO3 CMS 7.3 this has been changed. Dependency injection using ``@inject`` annotations and ``inject*()`` methods is now performed **before** calling ``initializeObject()``.
+
+This may have impact on extensions that are relying on the reversed call order. In these cases adjustments are required to take into account that the injected objects are available.
+
+.. _documentation: http://wiki.typo3.org/Dependency_Injection#initializeObject.28.29_as_object_lifecycle_method