Page MenuHomePhabricator

PHPCompatibility lint rule can't handle namespaced class/function name.
Open, Needs TriagePublic


PHPCompatibility does not resolve namespaced class name or function name. For example,

use MyNamespace\CURLFile;

new CURLFile();
$ arc lint test.php
   Error  (XHP45) PHP Compatibility
    This codebase targets PHP 5.2.3, but `CURLFile` was not introduced until
    PHP 5.5.0.

               3 use MyNamespace\CURLFile;
    >>>        5 new CURLFile();

Clearly the code is using \MyNamespace\CURLFile instead of \CURLFile.

Event Timeline

wjiang created this task.May 16 2017, 2:06 AM
wjiang updated the task description. (Show Details)
chad added a subscriber: chad.May 16 2017, 2:27 AM

I assume this is T4334

In T12716#223717, @chad wrote:

I assume this is T4334

Ah, yeah, I'll make diffs under T4334 then.