Re: [PATCH] Bug #49852 & Bug #53065 - Adding spl_autoload_case_sensitivity()
| From: | Marc Easen | Date: | Wed, 12 Jan 2011 22:53:52 +0000 |
| Subject: | Re: [PATCH] Bug #49852 & Bug #53065 - Adding spl_autoload_case_sensitivity() | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-51260@lists.php.net to get a copy of this message | ||
Hello again,
Has anyone had a chance to look at my patch?
Forgive me for being quite eager to get this into trunk, as it will improve the performance of all
PHP Frameworks which currently implement their own autoloader method due to the oddities of the SPL
autoloader.
Kind Regards
Marc
On 26 Dec 2010, at 13:20, Marc Easen wrote:
> Hello everyone,
>
> Firstly I would like to introduce myself, my name is Marc Easen and I've working with PHP
> for past 6 years or so. I'm really excited to see where PHP is going with the addition of
> namespaces and now traits, and hopefully I'm able to contribute back to PHP community.
>
> I've currently working on a high performance PHP Framework based on version 5.3.3+
> (5.3.99-dev for traits). Due to the high performance nature of this framework I've been looking
> at ways of improving the loading of the classes. It seems by default the spl_autoload() function
> lowercases the class name before trying to locate the file, a couples of users have reported this
> previously and have requested a fix (bug #49852
> http://bugs.php.net/bug.php?id=49852 & bug #53065
> http://bugs.php.net/bug.php?id=53065). spl_autoload() lower casing
> the class names when it is trying to locate the file does not work on *nix based system in a lot of
> PHP Frameworks - Zend Framework being on of them.
>
> Understanding the requirement to support backwards compatibility both submitters suggested
> implementing a spl_autoload_case_sensitivity() function. The patch I have attached adds such a
> function to the SPL extension. The patch is against trunk (r306670), it also includes phpt tests for
> this function.
>
> Please could someone review this patch and let me know what you think.
>
> Kind Regards,
>
> Marc
> <spl_autoload_case_sensitive.patch>
Attachment: [application/octet-stream] spl_autoload_case_sensitive.patch
Attachment: [application/octet-stream] spl_autoload_case_sensitive.patch