enriquepiatti / Magicento

PHPStorm plugin for Magento developers
115 stars 35 forks source link

[Magento 2] Argument for @NotNull parameter 'file' of com/magicento/models/layout/LayoutFile.<init> must not be null #239

Closed sergy-gzh closed 7 years ago

sergy-gzh commented 7 years ago

PhpStorm 2016.3.2 In file: file:///var/www/magento.local/vendor/magento/module-catalog-search/Model/ResourceModel/Fulltext/Collection.php: Argument for @NotNull parameter 'file' of com/magicento/models/layout/LayoutFile.<init> must not be null java.lang.IllegalArgumentException: Argument for @NotNull parameter 'file' of com/magicento/models/layout/LayoutFile.<init> must not be null at com.magicento.models.layout.LayoutFile.<init>(LayoutFile.java) at com.magicento.models.layout.Template.<init>(Template.java:24) at com.magicento.extensions.BlockTypeProvider2.getBySignature(BlockTypeProvider2.java:75) at com.jetbrains.php.PhpIndexImpl.getBySignatureInternal(PhpIndexImpl.java:469) at com.jetbrains.php.PhpIndexImpl.getBySignature(PhpIndexImpl.java:313) at com.jetbrains.php.PhpIndexImpl.completeType(PhpIndexImpl.java:79) at com.jetbrains.php.lang.psi.resolve.types.PhpType.globalLocationAware(PhpType.java:412) at com.jetbrains.php.lang.psi.elements.impl.MemberReferenceImpl.resolveGlobal(MemberReferenceImpl.java:147) at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl$1.resolve(PhpReferenceImpl.java:143) at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl$1.resolve(PhpReferenceImpl.java:140) at com.intellij.psi.impl.source.resolve.ResolveCache$3.compute(ResolveCache.java:142) at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112) at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:139) at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:167) at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:159) at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl.multiResolve(PhpReferenceImpl.java:135) at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl.resolve(PhpReferenceImpl.java:121) at com.jetbrains.php.lang.annotator.PhpAnnotatorVisitor.checkAccessModifiers(PhpAnnotatorVisitor.java:408) at com.jetbrains.php.lang.annotator.PhpAnnotatorVisitor.visitPhpMethodReference(PhpAnnotatorVisitor.java:390) at com.jetbrains.php.lang.psi.elements.impl.MethodReferenceImpl.accept(MethodReferenceImpl.java:29) at com.jetbrains.php.lang.annotator.PhpAnnotator.annotate(PhpAnnotator.java:19) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.a(DefaultHighlightVisitor.java:139) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:102) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:363) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:298) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:322) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:325) at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.analyze(XmlHighlightVisitor.java:748) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:325) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:325) at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:86) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:325) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:297) at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:237) at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:82) at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:433) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1061) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:426) 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.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:425) at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:405) at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:155) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

enriquepiatti commented 7 years ago

Hi @sergy-gzh are you using Magicento1 with Magento2 code? you need a different plugin for Magento2, please check www.magicento.com

sergy-gzh commented 7 years ago

@enriquepiatti its a little bit different. I had magicento 1 and magicento 2 on my magento 2 project. Disabling magicento 1 seems to solve the issue

enriquepiatti commented 7 years ago

Yes, you can use both versions, but you need to remove the shortcut for M1 and disable it (on the project, not the plugin itself), is explained here. http://magicento.com/#magicento2_installation