Add sniff to detect class_exists( 'string' ) and optionally replace with class_exists( string::class )
https://codesearch.wmflabs.org/search/?q=class_exists%5C(%20%27.*%3F%27%20%5C)&i=nope&files=&repos=
Add sniff to detect class_exists( 'string' ) and optionally replace with class_exists( string::class )
https://codesearch.wmflabs.org/search/?q=class_exists%5C(%20%27.*%3F%27%20%5C)&i=nope&files=&repos=
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
[PoC] Add ClassNameResolutionPlugin | mediawiki/tools/phan | master | +309 -0 |
Certainly useful in core, and it shouldn't be a "YOU MUST CHANGE THEM ALL" replacement..
Can we expand this ticket to all other cases with the same problem?
There is also stuff like 'class' => TheClass:class in API and ResouceLoader module registration and such, but it's probably super-hard to detect these in an automatic sniff.
Change 494036 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/tools/phan@master] [PoC] Add ClassNameResolutionPlugin