Skip to content

Bug Report 2026/03/04 #2636

@vikasmcfadyen

Description

@vikasmcfadyen

Describe the bug (*)

A clear and concise description of what the bug is.

java.lang.Throwable: psiElement is not instance of requiredClass.
psiElement=PhpPsiElementImpl, psiElement.class=class com.jetbrains.php.lang.psi.elements.impl.PhpClassFieldsListImpl, requiredClass=interface com.jetbrains.php.lang.psi.elements.PhpClass, operation=Looking for cart in php.class.shortName, stubIdList=[31]@0.
ref: 20250127
no dumbMode
com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: PSI and index do not match.
Please report the problem to JetBrains with the files attached
 file=PHP file, file.class=class com.jetbrains.php.lang.psi.PhpFileImpl, file.lang=Language: PHP, modStamp=3, psi.length=28659
 tree consistent
 stub debugInfo=created in calcStubTree; with backReference
 viewProvider=com.jetbrains.php.lang.PhpFileViewProvider{vFile=file:////wsl$/Ubuntu/var/www/html/Amneal/amneal/app/code/Amneal/QuickOrder/Model/Cart.php, vFileId=1158875, content=VirtualFileContent{size=30249}, eventSystemEnabled=true}
 viewProvider stamp: 45115; file stamp: 42085; file modCount: 1772562901212; file length: 30249
 doc saved: false; doc stamp: 45115; doc size: 28659; committed: true
indexing info: indexing timestamp = 1772562901212, binary = false, byte size = 30249, char size = 28659
ref: 20250127
latestIndexedStub=StubTree{myDebugInfo='created from index; with backReference', myRoot=PhpFileStubImpl}540406166
   same size=false
   debugInfo=created from index; with backReference
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:375)
	at com.intellij.psi.stubs.StubProcessingHelperBase.inconsistencyDetected(StubProcessingHelperBase.java:204)
	at com.intellij.psi.stubs.StubProcessingHelperBase.checkType(StubProcessingHelperBase.java:132)
	at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:71)
	at com.intellij.psi.stubs.StubIndexEx.lambda$processElements$6(StubIndexEx.java:160)
	at com.intellij.psi.stubs.StubIndexEx.processElements(StubIndexEx.java:211)
	at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:104)
	at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:93)
	at com.jetbrains.php.PhpIndexImpl.getElements(PhpIndexImpl.java:753)
	at com.jetbrains.php.PhpIndexImpl.getByName(PhpIndexImpl.java:1179)
	at com.jetbrains.php.PhpIndexImpl.getByFQN(PhpIndexImpl.java:1156)
	at com.jetbrains.php.PhpIndexImpl.getByFqnCacheAware(PhpIndexImpl.java:1237)
	at com.jetbrains.php.PhpIndexImpl.getClassesByFQNInternal(PhpIndexImpl.java:1232)
	at com.jetbrains.php.PhpIndexImpl.getAnyByFQN(PhpIndexImpl.java:1271)
	at com.magento.idea.magento2plugin.reference.provider.PhpClassReferenceProvider.getReferencesByElement(PhpClassReferenceProvider.java:80)
	at com.magento.idea.magento2plugin.reference.provider.CompositeReferenceProvider.getReferencesByElement(CompositeReferenceProvider.java:30)
	at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.getReferences(ReferenceProvidersRegistryImpl.java:164)
	at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.mapNotEmptyReferencesFromProviders(ReferenceProvidersRegistryImpl.java:145)
	at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.doGetReferencesFromProviders(ReferenceProvidersRegistryImpl.java:124)
	at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.lambda$getReferencesFromProviders$0(ReferenceProvidersRegistry.java:44)
	at com.intellij.psi.util.CachedValuesManager$NonPhysicalPsiHandlerProvider.compute(CachedValuesManager.java:222)
	at com.intellij.psi.util.CachedValuesManager$NonPhysicalPsiHandlerProvider.compute(CachedValuesManager.java:215)
	at com.intellij.psi.impl.PsiParameterizedCachedValue.doCompute(PsiParameterizedCachedValue.kt:24)
	at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:299)
	at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:37)
	at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:299)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:113)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:28)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
	at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:300)
	at com.intellij.psi.impl.PsiParameterizedCachedValue.getValue(PsiParameterizedCachedValue.kt:18)
	at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:208)
	at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:136)
	at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(ReferenceProvidersRegistry.java:42)
	at com.intellij.psi.impl.source.xml.XmlAttributeValueImpl.getReferences(XmlAttributeValueImpl.java:80)
	at com.intellij.psi.impl.source.xml.XmlAttributeValueImpl.getReferences(XmlAttributeValueImpl.java:95)
	at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.checkReferences(XmlHighlightVisitor.java:473)
	at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.visitXmlAttributeValue(XmlHighlightVisitor.java:436)
	at com.intellij.psi.impl.source.xml.XmlAttributeValueImpl.accept(XmlAttributeValueImpl.java:44)
	at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.visit(XmlHighlightVisitor.java:71)
	at com.intellij.codeInsight.daemon.impl.HighlightVisitorRunner.runVisitor(HighlightVisitorRunner.java:195)
	at com.intellij.codeInsight.daemon.impl.HighlightVisitorRunner.lambda$runVisitors$3(HighlightVisitorRunner.java:120)
	at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.analyze(XmlHighlightVisitor.java:81)
	at com.intellij.codeInsight.daemon.impl.HighlightVisitorRunner.lambda$runVisitors$4(HighlightVisitorRunner.java:118)
	at com.intellij.concurrency.ApplierCompleter.processArrayItem(ApplierCompleter.java:121)
	at com.intellij.concurrency.ApplierCompleter.processArray(ApplierCompleter.java:205)
	at com.intellij.concurrency.ApplierCompleter.execAll(ApplierCompleter.java:171)
	at com.intellij.concurrency.JobLauncherImpl.lambda$invokeConcurrentlyUnderProgressAsync$3(JobLauncherImpl.jav

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: Windows 11.0
  • PhpStorm/Intellij version: 2025.1.7
  • Plugin Version: 2025.2.2

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions