Edit report at http://bugs.php.net/bug.php?id=51991&edit=1
ID: 51991 Comment by: mike at digitalstruct dot com Reported by: grummfy at gmail dot com Summary: spl_autoload and *nix support with namespace Status: Closed Type: Bug Package: SPL related Operating System: linux, mac, *nix PHP Version: 5.3.2 Assigned To: felipe Block user comment: N Private report: N New Comment: This is hard to believe that automatically lowercasing the path is not a bug... the majority of PHP users are actually on *nix platforms - especially in production. Causing the paths to automatically be lowercase drastically takes away from the default functionality. I apologize if I am being arrogant here - however, when you write include 'My/Path/To/A/File.php' it does not lowercase that path so why should spl_autoload do anything different with the default behavior? Offending code to fix this is on line: 303 in trunk of php_spl.c: 303 >--- lc_name = zend_str_tolower_dup(class_name, class_name_len); Removing the str_tolower would resolve this issue and we would all be happy. I will post to php-dev as well with a patch. Previous Comments: ------------------------------------------------------------------------ [2010-07-28 00:20:23] [email protected] Exactly. You can implement your custom autoload to behaves as you want. The lowercased stuff is good for some people, but is not the desired for others. ------------------------------------------------------------------------ [2010-07-27 20:05:46] xstansa at gmail dot com Are you saying that I'll have to rename all my php file names to be lowercase on Linux to use spl_autoload? ------------------------------------------------------------------------ [2010-07-27 03:34:20] [email protected] Hi, I forgot to say... the path that will be tried to be found it is lowercased. i.e. my/framework/test.php See bug #52406 Thanks. ------------------------------------------------------------------------ [2010-07-27 02:58:24] xstansa at gmail dot com I've already checked that using phpinfo(). It is PHP 5.3.3. ------------------------------------------------------------------------ [2010-07-26 23:54:29] [email protected] Hi, make sure you are using the right version... (phpversion()) ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=51991 -- Edit this bug report at http://bugs.php.net/bug.php?id=51991&edit=1
