| Subject | Details |
| :------------- | :---------------------------------------------------------------------------- |
| Plugin | Php Inspections (EA Extended) 4.0.1.1 |
| Language level | PHP 7.0 |
In some case it will try to import (use) the class itself.
namespace Some\NameSpace;
+ use Some\NameSpace\ClassName;
class ClassName{
function someFunction() {
- echo 'Some\NameSpace\ClassName';
+ echo ClassName::class;
}
}
Just echo ClassName::class; ?
PhpStorm 2019.3
Build #PS-193.5233.101, built on November 27, 2019
Runtime version: 11.0.4+10-b520.11 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 6110M
Cores: 4
Registry: run.processes.with.pty=TRUE, ide.balloon.shadow.size=0
Non-Bundled Plugins: BashSupport, Realigner, com.alayouni.ansiHighlight, com.intellij.ideolog, com.kalessil.phpStorm.phpInspectionsEA, com.urswolfer.intellij.plugin.gerrit, de.espend.idea.laravel, de.espend.idea.php.toolbox, de.espend.idea.php.annotation, intellij.prettierJS, izhangzhihao.rainbow.brackets, mobi.hsz.idea.gitignore, net.seesharpsoft.intellij.plugins.csv, org.elm.klazuka, org.jetbrains.plugins.rest, org.psliwa.idea.composer, org.sylfra.idea.plugins.linessorter, ru.adelf.idea.dotenv
Thank you for reporting @HenkPoley, good catch. I'll take care of fixing this.
@HenkPoley, looks like we have implemented this long time ago. Please check the inspection settings: there is "Use relative QN where possible" option there. it should do the trick.
Most helpful comment
Thank you for reporting @HenkPoley, good catch. I'll take care of fixing this.