[php-src] PR #22594: ext/spl: spl_autoload() builds include filename from case-preserved class name
| From: | jorgsowa | Date: | Sat, 04 Jul 2026 14:27:09 +0000 |
| Subject: | [php-src] PR #22594: ext/spl: spl_autoload() builds include filename from case-preserved class name | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-36829@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/22594
Author: jorgsowa
The default
spl_autoload() implementation lowercased the class name before appending
the file extension, so a class like MyClass would only autoload from
myclass.php, never MyClass.php. This is fine on case-insensitive
filesystems (macOS, Windows) but breaks autoloading of any non-lowercase-named class on
case-sensitive filesystems (Linux) unless the file on disk happens to be lowercase.
This change breaks backward compatibility of spl autoloading; I'm not sure where it should be
fixed, master or PHP 8.4. Or maybe it should be deprecated first?