nvlad / yii2support

Yii2 Support for PhpStorm / IntelliJ IDEA
https://plugins.jetbrains.com/idea/plugin/9388-yii2-support
Other
295 stars 54 forks source link

Error while indexing #148

Closed clarifysky closed 7 years ago

clarifysky commented 7 years ago

As below, how to solve this problem ?

Error while indexing /Users/rex/Documents/WorkSpace/app/vendor/yiisoft/yii2/filters/auth/CompositeAuth.php
To reindex this file IDEA has to be restarted: com.jetbrains.php.lang.psi.elements.impl.VariableImpl.getDeclaredType()Lcom/jetbrains/php/lang/psi/resolve/types/PhpType;
java.lang.NoSuchMethodError: com.jetbrains.php.lang.psi.elements.impl.VariableImpl.getDeclaredType()Lcom/jetbrains/php/lang/psi/resolve/types/PhpType;
    at com.nvlad.yii2support.typeprovider.YiiTypeProvider.getType(YiiTypeProvider.java:45)
    at com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo$1.internalCompute(PhpTypeInfo.java:57)
    at com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo$1.internalCompute(PhpTypeInfo.java:39)
    at com.intellij.openapi.util.Computable$NotNullCachedComputable.compute(Computable.java:52)
    at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
    at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
    at com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo.getType(PhpTypeInfo.java:39)
    at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl.getType(PhpReferenceImpl.java:206)
    at com.jetbrains.php.codeInsight.typeInference.PhpTypeInferenceUtil.inferType(PhpTypeInferenceUtil.java:215)
    at com.jetbrains.php.lang.psi.resolve.types.PhpTypeAnalyserVisitor.addTypeFromExpression(PhpTypeAnalyserVisitor.java:69)
    at com.jetbrains.php.lang.psi.resolve.types.PhpTypeAnalyserVisitor.visitPhpVariable(PhpTypeAnalyserVisitor.java:145)
    at com.jetbrains.php.lang.psi.elements.impl.VariableImpl.accept(VariableImpl.java:118)
    at com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo$1.internalCompute(PhpTypeInfo.java:46)
    at com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo$1.internalCompute(PhpTypeInfo.java:39)
    at com.intellij.openapi.util.Computable$NotNullCachedComputable.compute(Computable.java:52)
    at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
    at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
    at com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo.getType(PhpTypeInfo.java:39)
    at com.jetbrains.php.codeInsight.typeInference.PhpTypeInferenceUtil.getType(PhpTypeInferenceUtil.java:244)
    at com.jetbrains.php.lang.psi.elements.impl.VariableImpl.getType(VariableImpl.java:539)
    at com.jetbrains.php.lang.psi.elements.impl.MemberReferenceImpl.resolveLocal(MemberReferenceImpl.java:115)
    at com.jetbrains.php.lang.psi.elements.impl.MemberReferenceImpl.resolveLocal(MemberReferenceImpl.java:69)
    at com.jetbrains.php.lang.psi.elements.impl.MemberReferenceImpl.resolveLocalType(MemberReferenceImpl.java:76)
    at com.jetbrains.php.lang.psi.resolve.types.PhpTypeAnalyserVisitor.visitPhpReference(PhpTypeAnalyserVisitor.java:84)
    at com.jetbrains.php.lang.psi.resolve.types.PhpTypeAnalyserVisitor.visitPhpMethodReference(PhpTypeAnalyserVisitor.java:405)
    at com.jetbrains.php.lang.psi.elements.impl.MethodReferenceImpl.accept(MethodReferenceImpl.java:29)
    at com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo$1.internalCompute(PhpTypeInfo.java:46)
    at com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo$1.internalCompute(PhpTypeInfo.java:39)
    at com.intellij.openapi.util.Computable$NotNullCachedComputable.compute(Computable.java:52)
    at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
    at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
    at com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo.getType(PhpTypeInfo.java:39)
    at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl.getType(PhpReferenceImpl.java:206)
    at com.jetbrains.php.codeInsight.typeInference.PhpTypeInferenceUtil.inferType(PhpTypeInferenceUtil.java:215)
    at com.jetbrains.php.lang.psi.resolve.types.PhpTypeAnalyserVisitor.addTypeFromExpression(PhpTypeAnalyserVisitor.java:69)
    at com.jetbrains.php.lang.psi.resolve.types.PhpTypeAnalyserVisitor.visitPhpVariable(PhpTypeAnalyserVisitor.java:145)
    at com.jetbrains.php.lang.psi.elements.impl.VariableImpl.accept(VariableImpl.java:118)
    at com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo$1.internalCompute(PhpTypeInfo.java:46)
    at com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo$1.internalCompute(PhpTypeInfo.java:39)
    at com.intellij.openapi.util.Computable$NotNullCachedComputable.compute(Computable.java:52)
    at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
    at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
    at com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo.getType(PhpTypeInfo.java:39)
    at com.jetbrains.php.codeInsight.typeInference.PhpTypeInferenceUtil.getType(PhpTypeInferenceUtil.java:244)
    at com.jetbrains.php.lang.psi.elements.impl.VariableImpl.getType(VariableImpl.java:539)
    at com.jetbrains.php.lang.psi.elements.impl.FunctionImpl.visitReturn(FunctionImpl.java:209)
    at com.jetbrains.php.lang.psi.elements.impl.FunctionImpl.scanTree(FunctionImpl.java:241)
    at com.jetbrains.php.lang.psi.elements.impl.FunctionImpl.getInferredType(FunctionImpl.java:181)
    at com.jetbrains.php.lang.psi.elements.impl.FunctionImpl.getLocalType(FunctionImpl.java:145)
    at com.jetbrains.php.lang.psi.elements.impl.MethodImpl.getLocalType(MethodImpl.java:230)
    at com.jetbrains.php.lang.psi.stubs.PhpMethodElementType.createStub(PhpMethodElementType.java:33)
    at com.jetbrains.php.lang.psi.stubs.PhpMethodElementType.createStub(PhpMethodElementType.java:17)
    at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.a(DefaultStubBuilder.java:113)
    at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.visitNode(DefaultStubBuilder.java:88)
    at com.intellij.psi.stubs.DefaultStubBuilder$StubBuildingWalkingVisitor.buildStubTree(DefaultStubBuilder.java:83)
    at com.intellij.psi.stubs.DefaultStubBuilder.buildStubTreeFor(DefaultStubBuilder.java:58)
    at com.intellij.psi.stubs.DefaultStubBuilder.buildStubTree(DefaultStubBuilder.java:39)
    at com.intellij.psi.stubs.StubTreeBuilder.buildStubTree(StubTreeBuilder.java:86)
    at com.intellij.psi.stubs.StubUpdatingIndex$4.a(StubUpdatingIndex.java:209)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:879)
    at com.intellij.psi.stubs.StubUpdatingIndex$4.map(StubUpdatingIndex.java:208)
    at com.intellij.psi.stubs.StubUpdatingIndex$4.map(StubUpdatingIndex.java:191)
    at com.intellij.util.indexing.MapReduceIndex.update(MapReduceIndex.java:461)
    at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1631)
    at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1567)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyIn(FileTypeManagerImpl.java:507)
    at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:1528)
    at com.intellij.util.indexing.FileBasedIndexImpl.indexFileContent(FileBasedIndexImpl.java:1513)
    at com.intellij.util.indexing.UnindexedFilesUpdater.a(UnindexedFilesUpdater.java:107)
    at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.a(CacheUpdateRunner.java:235)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1061)
    at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.a(CacheUpdateRunner.java:252)
    at com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:179)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:568)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:519)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:164)
    at com.intellij.openapi.project.CacheUpdateRunner$MyRunnable.run(CacheUpdateRunner.java:248)
    at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:309)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
insperedia commented 7 years ago

Looks like you have an old version of IDE. Could you provide version you use?

clarifysky commented 7 years ago

This is the IDE information:

PhpStorm 2016.3.3
Build #PS-163.13906.21, built on March 8, 2017

JRE: 1.8.0_112-release-408-b6 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
clarifysky commented 7 years ago

I just upgrade my IDE to version 2017.2.4, it seems working ok.