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

Helmut Hummel helmut at typo3.org
Thu Sep 2 17:55:43 CEST 2010


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.

If I'm not completly mistaken the logging can be safely removed without 
any downside. This should be done at least for trunk, but I suggest to 
do this also in 4.3 and 4.4.

If we agree to remove the logging, I will provide a RFC on the core 
list, but I wanted to discuss this here first.

Please share your opinion, thanks.

Regards Helmut




More information about the TYPO3-dev mailing list