How to add support for custom PHP class fields?

We have classes that have some fields declared separately to class, however we want them to be in autocomplete and to be properly references.

Autocomplete part of plugin gives no problems, however I can't make PhpStorm to understand field types.

I'm implementing PsiReferenceContributor with psiReferenceRegistrar.registerReferenceProvider(PlatformPatterns.psiElement()... to be able to provide proper references to fields, but I'm simply not getting them in getReferencesByElement cycle.

I.e. if i write $request->address I'm able to make autocomplete to suggest "address" but I'm not able to provide a type for that or Ctrl-click functionality

How do I add custom fields support?

0

Please sign in to leave a comment.