Haehnchen / idea-php-laravel-plugin

Laravel Framework Plugin for PhpStorm / IntelliJ IDEA
MIT License
572 stars 108 forks source link

PHPStorm 2021.3 throws an exception: java.lang.Throwable: '#LineMarkerInfo is deprecated and going to be removed soon #275

Closed tekord closed 2 years ago

tekord commented 2 years ago

Just installed fresh PHPStorm 2021.3 (Windows 10), opened a .blade file and got the following error:

java.lang.Throwable: '#LineMarkerInfo(T, TextRange, Icon, int, Function, GutterIconNavigationHandler, Alignment)' is deprecated and going to be removed soon. Please use `LineMarkerInfo(T, TextRange, Icon, Function, GutterIconNavigationHandler, Alignment, Supplier)` instead
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:182)
    at com.intellij.diagnostic.PluginException.reportDeprecatedUsage(PluginException.java:105)
    at com.intellij.codeInsight.daemon.LineMarkerInfo.<init>(LineMarkerInfo.java:162)
    at de.espend.idea.laravel.blade.TemplateLineMarker.getRelatedPopover(TemplateLineMarker.java:270)
    at de.espend.idea.laravel.blade.TemplateLineMarker.collectOverwrittenSection(TemplateLineMarker.java:183)
    at de.espend.idea.laravel.blade.TemplateLineMarker.collectSlowLineMarkers(TemplateLineMarker.java:84)
    at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryProviders(LineMarkersPass.java:190)
    at com.intellij.codeInsight.daemon.impl.LineMarkersPass.lambda$doCollectInformation$3(LineMarkersPass.java:93)
    at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:115)
    at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectInformation(LineMarkersPass.java:80)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:414)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1084)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:407)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:406)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:382)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:181)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:380)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:184)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
nzkozar commented 2 years ago

+1

tekord commented 2 years ago

The fix looks easy. I just modified the constructor arguments of the LineMarkerInfo class. But I can't install it into PhpStorm due to version incompatibility:

Plugin 'Laravel' ... is not compatible with the current version of the IDE, because it requires build 191.* or older but the current build is PS-213.5744.279

Does anybody know how to solve it? I have zero experience in JetBrains' IDE plugin development

Darkyn commented 2 years ago

Just started getting this as well after upgrading to storm 2021.3

vincej commented 2 years ago

+1

weblabio commented 2 years ago

+1

dontfreakout commented 2 years ago

I sent PR (#277) with a fix for this issue.

But if anybody wants a quick fix before PR will be accepted, here is my build with the fix applied: Google drive link

Just download the zip file and install it from the disk. PHP Storm will use it as an update. image

michabbb commented 2 years ago

@dontfreakout no more errors, I can confirm it´s working, thanks for the fix ! ❤️ 👍 (Build #PS-213.6777.58, built on January 31, 2022)

TraLeeee commented 2 years ago

@dontfreakout Wonderful, thank you so much!

johnef commented 2 years ago

@dontfreakout thanks worked for me too.