PhpIndex.getInstance fails
It fails with java.lang.IllegalStateException: @NotNull method com/jetbrains/php/PhpIndex.getInstance must not return null. My client code is:
Project project = psiElement.getProject();
PhpIndex index = PhpIndex.getInstance(project);
What can be wrong?
P.S. My primary language is not Java, so sorry if the question sounds stupid.
请先登录再写评论。
Hey Yurii. This looks weird and shouldn't happen. Could you please share more details on your setup. How do you run your plugin? How did you build it? Also, it may help if you share more details about your task. What are you trying to implement? Is it possible to make a short code snippet with which the problem can be reproduced? Also, wild guess: what dependency scope have php-openapi.jar and php.jar (optional)? It should be "provided".
Hi Artem!
I don't know what does the scope column mean, but setting php libs scope to `provided` solved the problem! :)
Thank you very much for your answer!