Issue Bug Closed

#67274initializeObject() called before dependency injection

Morton Jonuschat 06/03/15, 11:21 updated 10/23/17, 21:48

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