[TYPO3-project-4-3] TYPO3 autoloader case sensitivity: your opinion please

Xavier Perseguers typo3 at perseguers.ch
Fri Sep 18 12:19:45 CEST 2009


Hi Francois,

> There are two ways to solve that:
> 
> 1) document the fact that class names must be entered all lowercase in 
> the ext_autoload.php files (actually, there's no autoloader 
> documentation at all, and this particular point would have to be a big, 
> bold warning)

Actually, ext_autoload.php should not be manually created/edited unless one knows how it works (for example by making change to existing lines or copy/pasting an existing line to create a new 
reference and thus keep same format).

Problem is more that there is no "simple" way nor no documented way on how automatically generate this file. The documentation is hidden in blog_example where one can find the commented out line that 
trigger the ext_autoload.php file generation.

> 2) loop on all the entries in the ext_autoload.php file and apply 
> strtolower on the class names (i.e. the array keys).
> 
> I don't know the best solution. Solution 1 is the easiest one and a 
> badly spelled class name is quickly obvious. Solution 2 plays nicer with 
> developers, but with an added overhead, especially since (as far as I 
> can tell) the autoloader registry is not cached.
> 
> So I would rather go for 1. And you?

3) Document how to automatically generate this file
3b) Have a button in backend (e.g., in EM by editing an extension) to trigger the file generation (just as we may update ext_emconf.php)

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

One contribution a day keeps the fork away


More information about the TYPO3-project-4-3 mailing list