[TYPO3-dev] Remove logging of "failures" in t3lib_autoloader

Steffen Kamper info at sk-typo3.de
Thu Sep 2 18:04:11 CEST 2010


Hi helmut,

Helmut Hummel schrieb:
> Hi,
> 
> the t3lib_autoloader logs to syslog and devlog if it fails to autoload 
> the given classname.
> 
> This is wrong on so many levels:
> 
> 1. It logs with severity "critical", which is wrong because it may be
>    that another registered autoloader may correctly handle the loading
>    of the class. So it could be a "notice", but I doubt this is usefull.
> 2. t3lib_autoloader is registered at a very early stage, so it will
>    always be the _first_ in queue to try including the class file and
>    it cannot know if other autoloaders may be registered later on.
> 3. If you have a class_exists() in your code gracefully continuing if
>    the class is not there, the autoloader is triggered and logs a
>    failure which is not present.
> 4. If there is indeed a problem and the class cannot be required, PHP
>    will throw an fatal error anyway.
> 5. Since even extbase comes with an own autoloader, it's not only a
>    problem with third party extensions but with shipped components as
>    well.
> 

all points are valid, i also see no sense in this logging. As you 
pointed out, if a class is not found, it ends with a php error anyways.

So +1 for removal,

vg Steffen




More information about the TYPO3-dev mailing list