[php-src] PR #12949: Remove warning "use statement with non-compound name '...' has no effect"
| From: | thg2k | Date: | Wed, 13 Dec 2023 10:03:36 +0000 |
| Subject: | [php-src] PR #12949: Remove warning "use statement with non-compound name '...' has no effect" | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-24514@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/12949
Author: thg2k
This message was in fact not true, as the statement indeed *has* an effect, that is fixing the case
for a potential autoloading invocation, as in:
use Alpha;
new alpha(); // will issue autoload for "Alpha" instead of "alpha"
This is very relevant for case-sensitive file systems that load classes using their name as file
name.
Moreover, there is not a reason to issue a warning for no-ops, this is a task for static analyzers,
not the language itself.