PHP: Provide magic method references?
Answered
I have implemented a CompletionContributor that knows about existing magic-methods in given PHP classes.
When completed, MethodReference Psi Elements are created correctly, but the "method not found" inspection fires and thus the accessed method is presented as non-existent to the user.
I know the PHP plugin can work with `@method` doc tags and provide virtual methods.
What are my options to provide virtual methods for a given class programmatically?
Please sign in to leave a comment.
Hello!
Unfortunately, for now there is no way to provide custom references on method call programatically. I created technical issue about this ability: https://youtrack.jetbrains.com/issue/WI-42266.
Also we have issue about resolving magic methods via __call - https://youtrack.jetbrains.com/issue/WI-16002.