Object Builder injects constructor arguments of previous builds if no arguments are passed explicitly
|Priority:||Should have||Due date:|
|Assignee:||Robert Lemke||% Done:||
|Has patch:||FLOW3 version affected:|
Code which exploits the bug:
$component1 = $componentManager->getComponent('T3_TestPackage_ClassWithOptionalConstructorArguments', 'someValue'); echo $component1->argument1; // output: "someValue" $component2 = $componentManager->getComponent('T3_TestPackage_ClassWithOptionalConstructorArguments'); echo $component2->argument1; // output: still "someValue", expected output: ""
Mainly worked on #263 - but solving it had various side effects and (fortunately) exploited a few older bugs we didn't know yet.
- FLOW3: Fixed whitespaces and inline documentation in some classes I came across
- FLOW3: (AOP) Changed a RuntimeException to T3_FLOW3_AOP_Exception in the AOP Framework class.
- FLOW3: (AOP) The T3_FLOW3_AOP_Pointcut component is now also registered as a T3_FLOW3_AOP_PointcutInterface component type. Background: Some Dependency Injection failed because only *Interface was specified in the constructor argument, but such a component didn't exist.
- FLOW3: (AOP) The Proxy Class Builder now transfers all class annotations from the target class to the proxy class. Fixes #266.
- FLOW3: (Component) Added a new feature to the Component Configuration: If an empty array is passed to setConstructorArguments(), all existing arguments are removed.
- FLOW3: (Component) Added a third parameter ($overridingConstructorArguments) to the create method of the Object Builder. This is mainly used by the component manager and fixes #263.