Skip to content

java.lang.ClassCastException: class com.jetbrains.php.lang.documentation.phpdoc.psi.impl.PhpDocMethodTagImpl cannot be cast to PhpClass #1180

Closed
@VitaliyBoyko

Description

@VitaliyBoyko

Describe the bug (*)

A clear and concise description of what the bug is.

java.lang.ClassCastException: class com.jetbrains.php.lang.documentation.phpdoc.psi.impl.PhpDocMethodTagImpl cannot be cast to class com.jetbrains.php.lang.psi.elements.PhpClass (com.jetbrains.php.lang.documentation.phpdoc.psi.impl.PhpDocMethodTagImpl and com.jetbrains.php.lang.psi.elements.PhpClass are in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @444daa8)
	at com.magento.idea.magento2plugin.lang.php.MagentoProxyDeclarationFilter.isValidFqn(MagentoProxyDeclarationFilter.java:61)
	at com.magento.idea.magento2plugin.lang.php.MagentoProxyDeclarationFilter.lambda$filter$0(MagentoProxyDeclarationFilter.java:53)
	at com.intellij.util.containers.ContainerUtil.findAll(ContainerUtil.java:895)
	at com.intellij.util.containers.ContainerUtil.filter(ContainerUtil.java:876)
	at com.magento.idea.magento2plugin.lang.php.MagentoProxyDeclarationFilter.filter(MagentoProxyDeclarationFilter.java:40)
	at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl.extendedResolve2(PhpReferenceImpl.java:173)
	at com.jetbrains.php.lang.psi.elements.impl.PhpBaseMemberReference.resolveGlobalDescriptors(PhpBaseMemberReference.java:81)
	at com.jetbrains.php.lang.psi.elements.impl.MethodReferenceImpl.resolveGlobalDescriptors(MethodReferenceImpl.java:104)
	at com.jetbrains.php.lang.psi.elements.impl.PhpBaseMemberReference.multiResolve(PhpBaseMemberReference.java:88)
	at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl.lambda$getResolver$0(PhpReferenceImpl.java:160)
	at com.intellij.psi.impl.source.resolve.ResolveCache$PolyVariantResolver.resolve(ResolveCache.java:69)
	at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolve$1(ResolveCache.java:154)
	at com.intellij.openapi.util.Computable.get(Computable.java:16)
	at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$loggingResolver$4(ResolveCache.java:260)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:114)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:44)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:237)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:154)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:169)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:162)
	at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl.multiResolve(PhpReferenceImpl.java:153)
	at com.jetbrains.php.lang.psi.elements.impl.MethodReferenceImpl.resolve(MethodReferenceImpl.java:147)
	at com.jetbrains.php.lang.psi.elements.impl.MethodReferenceImpl.resolve(MethodReferenceImpl.java:142)
	at com.jetbrains.php.lang.annotator.PhpAnnotatorVisitor.visitPhpMethodReference(PhpAnnotatorVisitor.java:1072)
	at com.jetbrains.php.lang.psi.elements.impl.MethodReferenceImpl.accept(MethodReferenceImpl.java:44)
	at com.jetbrains.php.lang.psi.elements.impl.PhpASTElementImpl.accept(PhpASTElementImpl.java:26)
	at com.jetbrains.php.lang.annotator.PhpAnnotator.annotate(PhpAnnotator.java:17)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:131)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:108)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:347)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$7(GeneralHighlightingPass.java:285)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:306)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$8(GeneralHighlightingPass.java:309)
	at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.analyze(XmlHighlightVisitor.java:606)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:309)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$8(GeneralHighlightingPass.java:309)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:93)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:309)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:276)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:221)
	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:97)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:57)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:400)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1154)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:393)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:392)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:368)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:215)
	at com.

To Reproduce (*)

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior (*)

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Please complete the following information: (*)

  • OS: Linux 5.15.0-47-generic
  • PhpStorm/Intellij version: 2022.2.1
  • Plugin Version: 4.4.0

Additional context

Add any other context about the problem here.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions