[TYPO3-mvc] injectReflectionService() recent change?
Xavier Perseguers
typo3 at perseguers.ch
Wed Oct 21 22:52:58 CEST 2009
> Could someone give me a hint how I should update my Repository classes
> as I now get this:
>
> #1: PHP Catchable Fatal Error: Argument 1 passed to
> Tx_Extbase_Persistence_Mapper_DataMapper::injectReflectionService() must
> be an instance of Tx_Extbase_Reflection_Service, null given, called in
> /path/to/extbase/Classes/Dispatcher.php on line 246 and defined in
> /path/to/extbase/Classes/Persistence/Mapper/DataMapper.php line 115
>
> I used to define an abstract class extending
> Tx_Extbase_Persistence_Repository and having "parent::__construct()" in
> my constructor. I basically don't need any datamapper coming from
> Extbase as it uses a legacy MSSQL database for which I created my own
> "data mapper".
>
> I tried to do this:
>
> public function __construct() {
> $dispatcher = t3lib_div::makeInstance('Tx_Extbase_Dispatcher');
> $dispatcher->initializeCache();
> $dispatcher->initializeReflection();
>
> parent::__construct();
>
> ...
> }
Problem is related to changeset 1480 by Jochen:
[~TASK] Extbase: Refactored Dispatcher. Moved initialization of cache and reflection to separate methods to decrease cohesion.
[~TASK] Extbase (MVC): Refactored classes and unit tests of Abstract Controller, Argument and Arguments. Moved creation of new Argument to separate method in Arguments class. Decoupled constructor
from object initialization to improve testability.
[~TASK] Extbase (MVC): Backported some changes to Argument performed in FLOW3. Second parameter of Argument constructor is now required.
[~TASK] Extbase (Persistence): Refactored ObjectStorage to remove duplicated code.
[+TASK] Extbase (Persistence): Refactored method setRelations() to single level of responsibility. this will enable to implement handling of mm relations defined with IRRE.
[+FEATURE] Extbase (Persistence): If a property is an ObjectStorage and annotated with @lazy a LazyObjectStorage is instanciated instead.
[~BUGFIX] Extbase (Persistence): The sorting field is now prefixed with the table name. Related to #4470.
After further analyzing, change in Classes/Dispatches.php introduced the problem I encounter by introducing calls to
$this->initializeCache();
$this->initializeReflection();
in method dispatch().
Please give an advice how to prevent those stuff that were not needed before (and are still not "needed", just "prettier") from disrupting me. Thanks.
--
Xavier Perseguers
http://xavier.perseguers.ch/en
One contribution a day keeps the fork away
More information about the TYPO3-project-typo3v4mvc
mailing list