magento2-phpstorm-plugin icon indicating copy to clipboard operation
magento2-phpstorm-plugin copied to clipboard

Bug Report 2024/01/22

Open AboElnoor opened this issue 1 year ago • 1 comments

Describe the bug (*)

A clear and concise description of what the bug is.

java.lang.Throwable: psiElement is not instance of requiredClass.
psiElement=PhpUseImpl: ConfigProvider, psiElement.class=class com.jetbrains.php.lang.psi.elements.impl.PhpUseImpl, requiredClass=interface com.jetbrains.php.lang.psi.elements.PhpClass, operation=Looking for simiconnectoraddpaymentmethod in php.class.shortName, stubIdList=[6].
ref: 50cf572587cf
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=25
 tree consistent
 stub debugInfo=created in calcStubTree; with backReference
 viewProvider=com.jetbrains.php.lang.PhpFileViewProvider{vFile=file:///Users/abonnoor/projects/local.inhouse.sa/app/code/Simi/Simicustompayment/Observer/SimiconnectorAddPaymentMethod.php, vFileId=34310, content=VirtualFileContent{size=1554}, eventSystemEnabled=true}
 viewProvider stamp: 1003401; file stamp: 1003401; file modCount: 1705921680453; file length: 1554
 doc saved: true; doc stamp: 1003401; doc size: 1554; committed: true
indexing info: indexing timestamp = 1705585860236, binary = false, byte size = 1222, char size = 1222
ref: 50cf572587cf
latestIndexedStub=null
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
	at com.intellij.psi.stubs.StubProcessingHelperBase.inconsistencyDetected(StubProcessingHelperBase.java:156)
	at com.intellij.psi.stubs.StubProcessingHelperBase.checkType(StubProcessingHelperBase.java:90)
	at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:61)
	at com.intellij.psi.stubs.StubIndexEx.lambda$processElements$5(StubIndexEx.java:152)
	at com.intellij.psi.stubs.StubIndexEx.processElements(StubIndexEx.java:202)
	at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:102)
	at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:90)
	at com.jetbrains.php.PhpIndexImpl.getElements(PhpIndexImpl.java:746)
	at com.jetbrains.php.PhpIndexImpl.getByName(PhpIndexImpl.java:1183)
	at com.jetbrains.php.PhpIndexImpl.getByFQN(PhpIndexImpl.java:1160)
	at com.jetbrains.php.PhpIndexImpl.getByFqnCacheAware(PhpIndexImpl.java:1241)
	at com.jetbrains.php.PhpIndexImpl.getClassesByFQNInternal(PhpIndexImpl.java:1236)
	at com.jetbrains.php.PhpIndexImpl.getAnyByFQN(PhpIndexImpl.java:1275)
	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:184)
	at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.mapNotEmptyReferencesFromProviders(ReferenceProvidersRegistryImpl.java:165)
	at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.doGetReferencesFromProviders(ReferenceProvidersRegistryImpl.java:144)
	at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(ReferenceProvidersRegistry.java:51)
	at com.intellij.psi.impl.source.xml.XmlAttributeValueImpl.getReferences(XmlAttributeValueImpl.java:80)
	at com.intellij.psi.PsiReferenceServiceImpl.doGetReferences(PsiReferenceServiceImpl.java:35)
	at com.intellij.psi.PsiReferenceServiceImpl.getReferences(PsiReferenceServiceImpl.java:25)
	at com.intellij.psi.search.SingleTargetRequestResultProcessor.processTextOccurrence(SingleTargetRequestResultProcessor.java:29)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl$6.lambda$execute$0(PsiSearchHelperImpl.java:1036)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.processTreeUp(LowLevelSearchUtil.java:87)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.lambda$processElementsAtOffsets$0(LowLevelSearchUtil.java:178)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.processOffsets(LowLevelSearchUtil.java:207)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.processElementsAtOffsets(LowLevelSearchUtil.java:177)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl$6.execute(PsiSearchHelperImpl.java:1032)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl$5.processInReadAction(PsiSearchHelperImpl.java:817)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl$5.processInReadAction(PsiSearchHelperImpl.java:808)
	at com.intellij.openapi.application.ReadActionProcessor.lambda$process$0(ReadActionProcessor.java:11)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:909)
	at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:65)
	at com.intellij.openapi.application.ReadActionProcessor.process(ReadActionProcessor.java:11)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processCandidates$19(PsiSearchHelperImpl.java:911)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processVirtualFile$12(PsiSearchHelperImpl.java:600)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1075)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.processVirtualFile(PsiSearchHelperImpl.java:579)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processPsiFileRoots$8(PsiSearchHelperImpl.java:450)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processFilesConcurrentlyDespiteWriteActions$10(PsiSearchHelperImpl.java:521)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:200)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:184)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processFilesConcurrentlyDespiteWriteActions$11(PsiSearchHelperImpl.java:520)
	at com.intellij.concurrency.JobLauncherImpl.lambda$processImmediatelyIfTooFew$2(JobLauncherImpl.java:144)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
	at com.intellij.openapi.progress.impl.Cor

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: Mac OS X 14.2.1
  • PhpStorm/Intellij version: 2023.3.2
  • Plugin Version: 5.1.1

Additional context

Add any other context about the problem here.

AboElnoor avatar Jan 22 '24 11:01 AboElnoor

Hi @AboElnoor. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information. Add a comment to assign the issue: @magento I am working on this


Join Magento Community Engineering Slack and ask your questions in #github channel.

m2-assistant[bot] avatar Jan 22 '24 11:01 m2-assistant[bot]