[TYPO3-mvc] injectReflectionService() recent change? (FIXED WITH PATCH)

Xavier Perseguers typo3 at perseguers.ch
Sat Oct 24 00:37:32 CEST 2009


Hi Jochen,

Some news here related to a new use case of the dispatcher related to thread "t3lib_extMgm::insertModuleFunction supported" in same mailing list.

> Second best solution: Put the two lines
> 
> $this->initializeCache();
> $this->initializeReflection();
> 
> into __constructor()
> 
> I have applied this in a changset attached. Could you please test it and 
> report if that works for you?

Your patch is indeed of a great help with the use of module functions. Without it, it is not possible to have an Extbase-based module extended by another Extbase-based module function as I got this error:

#1232044696: The Reflection Service can only be initialized once.

Order of calls:

  1 Tx_Extbase_Dispatcher::callModule("user_MvcExtjsSamplesBlank")
  2 Tx_Extbase_Dispatcher::transfer("user_MvcExtjsSamplesBlank", "BlankModule", "extObj")
  3 Tx_Extbase_Dispatcher::dispatch("", array)
  4 Tx_Extbase_MVC_Controller_ActionController::processRequest(Tx_Extbase_MVC_Web_Request, Tx_Extbase_MVC_Web_Response)
  5 Tx_Extbase_MVC_Controller_ActionController::callActionMethod()
  6 call_user_func_array(array, array)
  7 Tx_MvcExtjs_ExtJS_Controller_ActionController::extObjAction()
  8 t3lib_SCbase::extObjContent()
  9 Tx_Extbase_MVC_Controller_FunctionActionController::main()
10 Tx_Extbase_Dispatcher::callModule("Tx_MvcExtjsSamples_Controller_BlankExtObjController")
11 Tx_Extbase_Dispatcher::transfer("Tx_MvcExtjsSamples_Controller_BlankExtObjController", "BlankExtObj", "first")
12 Tx_Extbase_Dispatcher::dispatch("", array)
13 Tx_Extbase_Dispatcher::initializeReflection()
14 Tx_Extbase_Reflection_Service::initialize(NULL)

With your patch, it works, thus +1 by testing for this use case.

And I just analyzed problem with the other use-case when having an Extbase-based BE module extending a non-Extbase BE module. I had same problem as with my special datamapper use case. But I found 
that if I use the patch *and* I manually instantiate Extbase's dispatcher, then all works smoothly.

Thus another confirm that your patch is really useful and fixes a side-effect of the refactoring.

I hope you may commit it soon.

BTW I really like the new error handling introduced in 4.3. This is even more greater than XDebug ;-)

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away


More information about the TYPO3-project-typo3v4mvc mailing list