You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the "Add constructor mocks" intention in a test, only the class names of the constructor parameters are imported (i.e. use statements added) if they weren't present before.
When the class names are already imported, the $this->createMock(ClassName::class) statements will be added fine.
So currently I'll always have to run the intention twice. Just now I saw an exception being thrown. I couldn't tell if this was always the case, but the behaviour was like this for the longest time now (i.e. not only with recent updates of the plugin or PhpStorm itself).
I'm using the current version 6.2 btw.
PhpStorm Version
PhpStorm 2022.1.1 Preview
Build #PS-221.5591.26, built on April 29, 2022
Runtime version: 11.0.14.1+1-b2043.45 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.3.1
GC: G1 Young Generation, G1 Old Generation
Memory: 8192M
Cores: 10
stacktrace
com.intellij.psi.PsiInvalidElementAccessException: Element: class com.intellij.psi.impl.source.tree.LeafPsiElement #PHP because: containing file is null; hierarchy=class com.jetbrains.php.lang.psi.elements.impl.NewExpressionImpl, class com.jetbrains.php.lang.psi.elements.impl.AssignmentExpressionImpl, class com.jetbrains.php.lang.psi.elements.impl.StatementImpl, class com.jetbrains.php.lang.psi.elements.impl.GroupStatementImpl, class com.jetbrains.php.lang.psi.elements.impl.MethodImpl, class com.jetbrains.php.lang.psi.elements.impl.PhpClassImpl, class com.jetbrains.php.lang.psi.elements.impl.GroupStatementSimpleImpl, class com.jetbrains.php.lang.psi.elements.impl.PhpNamespaceImpl, class com.jetbrains.php.lang.psi.elements.impl.GroupStatementSimpleImpl, context=null, contextFile=null
invalidated at: see attachment; com.intellij.psi.impl.source.tree.LeafPsiElement:) / com.intellij.psi.impl.source.tree.CompositeElement:New expression / com.intellij.psi.impl.source.tree.CompositeElement:Assignment expression / com.intellij.psi.impl.source.tree.CompositeElement:Statement / com.jetbrains.php.lang.psi.elements.impl.GroupStatementImpl:Group statement / com.intellij.psi.impl.source.tree.CompositeElement:Class method / com.intellij.psi.impl.source.tree.CompositeElement:Class / com.intellij.psi.impl.source.tree.CompositeElement:PsiElement(Non Lazy Group statement) / com.intellij.psi.impl.source.tree.CompositeElement:Namespace / com.intellij.psi.impl.source.tree.CompositeElement:PsiElement(Non Lazy Group statement)
at com.intellij.psi.impl.source.tree.LeafPsiElement.invalid(LeafPsiElement.java:102)
at com.intellij.psi.impl.source.tree.LeafPsiElement.getProject(LeafPsiElement.java:260)
at de.espend.idea.php.phpunit.intention.ConstructorMockIntention$MyConstructorCommandActionArgument.run(ConstructorMockIntention.java:166)
at com.intellij.openapi.command.WriteCommandAction$Simple.run(WriteCommandAction.java:337)
at com.intellij.openapi.application.RunResult.run(RunResult.java:27)
at com.intellij.openapi.command.WriteCommandAction.lambda$performWriteCommandAction$1(WriteCommandAction.java:281)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1015)
at com.intellij.openapi.command.WriteCommandAction.lambda$performWriteCommandAction$2(WriteCommandAction.java:280)
at com.intellij.openapi.command.WriteCommandAction.lambda$doExecuteCommand$3(WriteCommandAction.java:310)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:210)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:184)
at com.intellij.openapi.command.WriteCommandAction.doExecuteCommand(WriteCommandAction.java:312)
at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:280)
at com.intellij.openapi.command.WriteCommandAction.execute(WriteCommandAction.java:261)
at de.espend.idea.php.phpunit.intention.ConstructorMockIntention.invoke(ConstructorMockIntention.java:52)
at com.intellij.codeInsight.intention.PsiElementBaseIntentionAction.invoke(PsiElementBaseIntentionAction.java:41)
at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.invoke(IntentionActionWrapper.java:61)
at com.intellij.codeInsight.intention.impl.IntentionActionWithTextCaching$MyIntentionAction.lambda$invoke$0(IntentionActionWithTextCaching.java:224)
at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:147)
at com.intellij.codeInsight.intention.impl.IntentionActionWithTextCaching$MyIntentionAction.invoke(IntentionActionWithTextCaching.java:224)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.lambda$invokeIntention$5(ShowIntentionActionsHandler.java:257)
at com.intellij.openapi.application.WriteAction.lambda$run$1(WriteAction.java:86)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:1003)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1029)
at com.intellij.openapi.application.WriteAction.run(WriteAction.java:85)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.invokeIntention(ShowIntentionActionsHandler.java:257)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.lambda$chooseActionAndInvoke$4(ShowIntentionActionsHandler.java:233)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:174)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:164)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:150)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.chooseActionAndInvoke(ShowIntentionActionsHandler.java:232)
at com.intellij.codeInsight.intention.impl.IntentionListStep.chooseActionAndInvoke(IntentionListStep.java:135)
at com.intellij.codeInsight.intention.impl.IntentionListStep.lambda$applyAction$3(IntentionListStep.java:127)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:95)
at com.intellij.ui.popup.AbstractPopup.lambda$dispose$18(AbstractPopup.java:1538)
at com.intellij.util.ui.EdtInvocationManager.invokeLaterIfNeeded(EdtInvocationManager.java:101)
at com.intellij.ide.IdeEventQueue.ifFocusEventsInTheQueue(IdeEventQueue.java:179)
at com.intellij.ide.IdeEventQueue.executeWhenAllFocusEventsLeftTheQueue(IdeEventQueue.java:132)
at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:172)
at com.intellij.ui.popup.AbstractPopup.dispose(AbstractPopup.java:1535)
at com.intellij.ui.popup.WizardPopup.dispose(WizardPopup.java:162)
at com.intellij.ui.popup.list.ListPopupImpl.dispose(ListPopupImpl.java:326)
at com.intellij.openapi.util.ObjectTree.runWithTrace(ObjectTree.java:139)
at com.intellij.openapi.util.ObjectTree.executeAll(ObjectTree.java:169)
at com.intellij.openapi.util.Disposer.dispose(Disposer.java:219)
at com.intellij.openapi.util.Disposer.dispose(Disposer.java:207)
at com.intellij.ui.popup.WizardPopup.disposeAllParents(WizardPopup.java:266)
at com.intellij.ui.popup.list.ListPopupImpl.handleNextStep(ListPopupImpl.java:434)
at com.intellij.ui.popup.list.ListPopupImpl._handleSelect(ListPopupImpl.java:406)
at com.intellij.ui.popup.list.ListPopupImpl.handleSelect(ListPopupImpl.java:356)
at com.intellij.ui.popup.list.ListPopupImpl$1.actionPerformed(ListPopupImpl.java:269)
at com.intellij.ui.popup.WizardPopup.proceedKeyEvent(WizardPopup.java:378)
at com.intellij.ui.popup.WizardPopup.dispatch(WizardPopup.java:354)
at com.intellij.ui.popup.PopupDispatcher.dispatchKeyEvent(PopupDispatcher.java:112)
at com.intellij.ui.popup.PopupDispatcher.dispatch(PopupDispatcher.java:148)
at com.intellij.ide.IdePopupManager.dispatch(IdePopupManager.java:109)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:710)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:119)
at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
invalidation.trace
java.lang.Throwable
at com.intellij.psi.impl.DebugUtil.beginPsiModification(DebugUtil.java:446)
at com.intellij.psi.impl.DebugUtil.performPsiModification(DebugUtil.java:479)
at com.intellij.pom.core.impl.PomModelImpl.lambda$runTransaction$2(PomModelImpl.java:104)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeNonCancelableSection$3(CoreProgressManager.java:223)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeInNonCancelableSection(CoreProgressManager.java:233)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:222)
at com.intellij.pom.core.impl.PomModelImpl.runTransaction(PomModelImpl.java:93)
at com.intellij.psi.impl.DiffLog.lambda$doActualPsiChange$0(DiffLog.java:244)
at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl.lambda$performActionWithFormatterDisabled$4(CodeStyleManagerImpl.java:459)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:128)
at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl.performActionWithFormatterDisabled(CodeStyleManagerImpl.java:487)
at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl.performActionWithFormatterDisabled(CodeStyleManagerImpl.java:458)
at com.intellij.psi.impl.DiffLog.doActualPsiChange(DiffLog.java:232)
at com.intellij.psi.impl.DocumentCommitThread.lambda$doCommit$5(DocumentCommitThread.java:298)
at com.intellij.psi.impl.PsiDocumentManagerBase.commitToExistingPsi(PsiDocumentManagerBase.java:420)
at com.intellij.psi.impl.PsiDocumentManagerBase.lambda$finishCommitInWriteAction$4(PsiDocumentManagerBase.java:394)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeInNonCancelableSection(CoreProgressManager.java:233)
at com.intellij.psi.impl.PsiDocumentManagerBase.lambda$finishCommitInWriteAction$5(PsiDocumentManagerBase.java:389)
at com.intellij.psi.impl.PsiDocumentManagerBase.executeInsideCommit(PsiDocumentManagerBase.java:505)
at com.intellij.psi.impl.PsiDocumentManagerBase.finishCommitInWriteAction(PsiDocumentManagerBase.java:387)
at com.intellij.psi.impl.PsiDocumentManagerImpl.finishCommitInWriteAction(PsiDocumentManagerImpl.java:125)
at com.intellij.psi.impl.PsiDocumentManagerBase.finishCommit(PsiDocumentManagerBase.java:348)
at com.intellij.psi.impl.DocumentCommitThread.lambda$commitUnderProgress$2(DocumentCommitThread.java:138)
at com.intellij.psi.impl.DocumentCommitThread.commitSynchronously(DocumentCommitThread.java:97)
at com.intellij.psi.impl.PsiDocumentManagerBase.lambda$doCommit$8(PsiDocumentManagerBase.java:490)
at com.intellij.psi.impl.PsiDocumentManagerBase.executeInsideCommit(PsiDocumentManagerBase.java:505)
at com.intellij.psi.impl.PsiDocumentManagerBase.doCommit(PsiDocumentManagerBase.java:490)
at com.intellij.psi.impl.PsiDocumentManagerBase.lambda$doCommit$7(PsiDocumentManagerBase.java:479)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1015)
at com.intellij.psi.impl.PsiDocumentManagerBase.doCommit(PsiDocumentManagerBase.java:479)
at com.intellij.psi.impl.PsiDocumentManagerBase.commitDocument(PsiDocumentManagerBase.java:328)
at com.intellij.psi.formatter.DocumentBasedFormattingModel.commitChanges(DocumentBasedFormattingModel.java:180)
at com.intellij.formatting.engine.ApplyChangesState.setDone(ApplyChangesState.java:207)
at com.intellij.formatting.engine.ApplyChangesState.doIteration(ApplyChangesState.java:190)
at com.intellij.formatting.engine.State.iteration(State.java:25)
at com.intellij.formatting.engine.StateProcessor.iteration(StateProcessor.java:26)
at com.intellij.formatting.FormatProcessor.iteration(FormatProcessor.java:108)
at com.intellij.formatting.FormatterImpl$MyFormattingTask.iteration(FormatterImpl.java:687)
at com.intellij.formatting.FormatterImpl.execute(FormatterImpl.java:267)
at com.intellij.formatting.FormatterImpl.format(FormatterImpl.java:234)
at com.intellij.psi.impl.source.codeStyle.CodeFormatterFacade.processText(CodeFormatterFacade.java:197)
at com.intellij.formatting.service.CoreFormattingService.formatRanges(CoreFormattingService.java:67)
at com.intellij.psi.impl.source.PostprocessReformattingAspect$ReformatRangesAction.lambda$execute$0(PostprocessReformattingAspect.java:776)
at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:147)
at com.intellij.psi.impl.source.PostprocessReformattingAspect$ReformatRangesAction.execute(PostprocessReformattingAspect.java:776)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.lambda$doPostponedFormattingInner$8(PostprocessReformattingAspect.java:386)
at com.intellij.psi.impl.source.codeStyle.CodeStyleManagerImpl.runWithDocCommentFormattingDisabled(CodeStyleManagerImpl.java:655)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.doPostponedFormattingInner(PostprocessReformattingAspect.java:385)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.lambda$doPostponedFormatting$6(PostprocessReformattingAspect.java:263)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.lambda$disablePostprocessFormattingInside$2(PostprocessReformattingAspect.java:120)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:128)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:119)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.lambda$doPostponedFormatting$7(PostprocessReformattingAspect.java:263)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeNonCancelableSection$3(CoreProgressManager.java:223)
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.computeInNonCancelableSection(CoreProgressManager.java:238)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:222)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.doPostponedFormatting(PostprocessReformattingAspect.java:261)
at com.intellij.psi.impl.PsiDocumentManagerImpl.doPostponedOperationsAndUnblockDocument(PsiDocumentManagerImpl.java:150)
at de.espend.idea.php.phpunit.intention.ConstructorMockIntention$MyConstructorCommandActionArgument.run(ConstructorMockIntention.java:164)
at com.intellij.openapi.command.WriteCommandAction$Simple.run(WriteCommandAction.java:337)
at com.intellij.openapi.application.RunResult.run(RunResult.java:27)
at com.intellij.openapi.command.WriteCommandAction.lambda$performWriteCommandAction$1(WriteCommandAction.java:281)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1015)
at com.intellij.openapi.command.WriteCommandAction.lambda$performWriteCommandAction$2(WriteCommandAction.java:280)
at com.intellij.openapi.command.WriteCommandAction.lambda$doExecuteCommand$3(WriteCommandAction.java:310)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:210)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:184)
at com.intellij.openapi.command.WriteCommandAction.doExecuteCommand(WriteCommandAction.java:312)
at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:280)
at com.intellij.openapi.command.WriteCommandAction.execute(WriteCommandAction.java:261)
at de.espend.idea.php.phpunit.intention.ConstructorMockIntention.invoke(ConstructorMockIntention.java:52)
at com.intellij.codeInsight.intention.PsiElementBaseIntentionAction.invoke(PsiElementBaseIntentionAction.java:41)
at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.invoke(IntentionActionWrapper.java:61)
at com.intellij.codeInsight.intention.impl.IntentionActionWithTextCaching$MyIntentionAction.lambda$invoke$0(IntentionActionWithTextCaching.java:224)
at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:147)
at com.intellij.codeInsight.intention.impl.IntentionActionWithTextCaching$MyIntentionAction.invoke(IntentionActionWithTextCaching.java:224)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.lambda$invokeIntention$5(ShowIntentionActionsHandler.java:257)
at com.intellij.openapi.application.WriteAction.lambda$run$1(WriteAction.java:86)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:1003)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1029)
at com.intellij.openapi.application.WriteAction.run(WriteAction.java:85)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.invokeIntention(ShowIntentionActionsHandler.java:257)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.lambda$chooseActionAndInvoke$4(ShowIntentionActionsHandler.java:233)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:174)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:164)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:150)
at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.chooseActionAndInvoke(ShowIntentionActionsHandler.java:232)
at com.intellij.codeInsight.intention.impl.IntentionListStep.chooseActionAndInvoke(IntentionListStep.java:135)
at com.intellij.codeInsight.intention.impl.IntentionListStep.lambda$applyAction$3(IntentionListStep.java:127)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:95)
at com.intellij.ui.popup.AbstractPopup.lambda$dispose$18(AbstractPopup.java:1538)
at com.intellij.util.ui.EdtInvocationManager.invokeLaterIfNeeded(EdtInvocationManager.java:101)
at com.intellij.ide.IdeEventQueue.ifFocusEventsInTheQueue(IdeEventQueue.java:179)
at com.intellij.ide.IdeEventQueue.executeWhenAllFocusEventsLeftTheQueue(IdeEventQueue.java:132)
at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:172)
at com.intellij.ui.popup.AbstractPopup.dispose(AbstractPopup.java:1535)
at com.intellij.ui.popup.WizardPopup.dispose(WizardPopup.java:162)
at com.intellij.ui.popup.list.ListPopupImpl.dispose(ListPopupImpl.java:326)
at com.intellij.openapi.util.ObjectTree.runWithTrace(ObjectTree.java:139)
at com.intellij.openapi.util.ObjectTree.executeAll(ObjectTree.java:169)
at com.intellij.openapi.util.Disposer.dispose(Disposer.java:219)
at com.intellij.openapi.util.Disposer.dispose(Disposer.java:207)
at com.intellij.ui.popup.WizardPopup.disposeAllParents(WizardPopup.java:266)
at com.intellij.ui.popup.list.ListPopupImpl.handleNextStep(ListPopupImpl.java:434)
at com.intellij.ui.popup.list.ListPopupImpl._handleSelect(ListPopupImpl.java:406)
at com.intellij.ui.popup.list.ListPopupImpl.handleSelect(ListPopupImpl.java:356)
at com.intellij.ui.popup.list.ListPopupImpl$1.actionPerformed(ListPopupImpl.java:269)
at com.intellij.ui.popup.WizardPopup.proceedKeyEvent(WizardPopup.java:378)
at com.intellij.ui.popup.WizardPopup.dispatch(WizardPopup.java:354)
at com.intellij.ui.popup.PopupDispatcher.dispatchKeyEvent(PopupDispatcher.java:112)
at com.intellij.ui.popup.PopupDispatcher.dispatch(PopupDispatcher.java:148)
at com.intellij.ide.IdePopupManager.dispatch(IdePopupManager.java:109)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:710)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:119)
at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
The text was updated successfully, but these errors were encountered:
When using the "Add constructor mocks" intention in a test, only the class names of the constructor parameters are imported (i.e.
use
statements added) if they weren't present before.When the class names are already imported, the
$this->createMock(ClassName::class)
statements will be added fine.So currently I'll always have to run the intention twice. Just now I saw an exception being thrown. I couldn't tell if this was always the case, but the behaviour was like this for the longest time now (i.e. not only with recent updates of the plugin or PhpStorm itself).
I'm using the current version 6.2 btw.
PhpStorm Version
stacktrace
invalidation.trace
The text was updated successfully, but these errors were encountered: