[TYPO3-dev] [TYPO3-mvc] URGENT CHANGE REQUEST: Dependency Injection Problems with ExtBase 1.3.0RC1

lists at bys.net lists at bys.net
Mon Jan 24 09:55:04 CET 2011


Hey Sebastian, 

Thanks for your reply.

> yeah, we can disable DI for a whole extension; could you provide a patch
> please?

I'll take a look. But I think, a better way would be to improve the DI and
use it, instead of deactivating it completly ... But there are some more
questions :)

Is there a reason, why the ExtBase DI is triggered by the methodName and not
explicitly by an annotation like "@inject"? A negative annotation like
"@doNotUseExtbaseDI" could be implemented with a single line in
classInfoFactory::getInjectMethods... With annotations we can use extbase-DI
where it is possible and our custom DI where it is not.

In the extension Michael talked about, we use factory classes to build our
objects. This is not supported by extbase-DI, which (if i read the code
correctly) just instantiate an object by t3lib_div::makeInstance(). I just
thought about a TS configuration option for that (forge wiki example):

config.tx_extbase.objects {
    Tx_Extbase_Persistence_Storage_BackendInterface {
        factoryMethod =
Tx_Extbase_Persistence_Storage_Typo3DbBackendFactory::makeInstance
    }
}


What about the feature to define the class names on a per-extension basis as
mentioned in the wiki? Are there plans to do that in the near future? 


Thanks,
Daniel
_______________________________________________
TYPO3-dev mailing list
TYPO3-dev at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev





More information about the TYPO3-dev mailing list