[BUGFIX] Extbase (Object): Allow injection of prototypes via dependency injection
authorSebastian Kurfürst <sebastian@typo3.org>
Fri, 21 Jan 2011 12:34:03 +0000 (12:34 +0000)
committerSebastian Kurfürst <sebastian@typo3.org>
Fri, 21 Jan 2011 12:34:03 +0000 (12:34 +0000)
commit74a61c8496f82ca23560eece9370b53b935c1ff7
tree57c135fd1e5007082398718bd7f8b10f9210b0a7
parentd347183070ee81fa5ac42481d2534b464fd014c6
[BUGFIX] Extbase (Object): Allow injection of prototypes via dependency injection

This change allows Injection of Prototypes into singletons
and prototypes. Now, all four cases are supported:

* Singletons which need Singletons (most common)
* Singletons which need Prototypes (very uncommon,
  as it usually hints at the fact that the injected
  prototype should be a singleton). In this case,
  WE WRITE A DEVLOG MESSAGE
* Prototypes which need Singletons
* Prototypes which need Prototypes

All cases above are covered with unit tests, both
when using setter injection and when using constructor
injection.

Additionally, I greatly improved the unit tests, and added
working cycle detection in case of prototype objects
depending on each other.

Resolves: #12013
typo3/sysext/extbase/Classes/Object/Container/Container.php
typo3/sysext/extbase/Classes/Object/Exception/CannotBuildObject.php
typo3/sysext/extbase/Tests/Unit/Object/Container/ContainerTest.php
typo3/sysext/extbase/Tests/Unit/Object/Container/Fixtures/Testclasses.php