#67274initializeObject() called before dependency injection
Description
Given typical extbase controller actions:
public function listAction() {
$records = $this->modelRepository->findAll();
$this->view->assign('records', $records);
}
public function showAction(Model $model) {
$this->view->assign('model', $model);
}
The method initializeObject() on the Models is called before the dependency injection has been performed. According to http://wiki.typo3.org/Dependency_Injection#initializeObject.28.29_as_object_lifecycle_method `initializeObject()` is called after DI has been done.
Tested on 6.2.12
Reviews 5
- TYPO3_6-2 40056[BUGFIX] Call initializeObject() after instantiating empty objects
- main 40213[FOLLOWUP][TASK] Document DI happening before initializeObject()
- main 40195[TASK] Document DI happening before initializeObject()
- TYPO3_6-2 40163[TASK] Nail down php 5.6 instantiation issues in tests
- main 39914[BUGFIX] Call initializeObject() after instantiating empty objects