[TYPO3-dev] Behavior of the core autoloader in TYPO3 versions 4.3.0 and above

Jochen Rau jochen.rau at typoplanet.de
Sat Apr 3 21:05:35 CEST 2010


Hi Helmut.

On 03.04.10 18:52, Helmut Hummel wrote:
> Am 03.04.10 14:42, schrieb Helmut Hummel:
>>
>> 1. Why is the spl_autoload called at all?
>>  From my understanding it "only" looks for matching class files in the
>> php include_path. The matching pattern is<className>.php
>
> Meanwhile Marcus explained me, that it could be usefull calling the
> spl_autoload implementation to have autoloading for PEAR classes.
>
> So there's only one question remaining, why the core autoloader logs
> error messages despite there might be other registered spl autoloaders
> which could handle (auto)loading those classes.

I stumbled upon that behavior, too. Logging only makes sense if it 
doesn't flood the Log. In case of Extbase related extensions it's 
totally useless, because Extbase takes care of the autoloading.

Unfortunately, the logging "feature" is hardcoded:

if (!class_exists($className, false) && !interface_exists($className, 
false)) {
	self::logLoadingFailure($className);
}

in t3lib_autoloader. I suggest to make it configurable and to diable it 
by default.

BTW the same logging issue is with the deprecationLog. It's configurabel 
but enabled by default. So, the log is flooded by "old" extensions and 
slows down, the page generation significantly.

Regards
Jochen




More information about the TYPO3-dev mailing list