dereuromark/cakephp-ide-helper

Clicking on a virtual field should take you to getter method instead of property annotation

cnizzardini opened this issue · 5 comments

Is it possible when clicking on a virtual field in PHP Storm such as $entity->virtual_field that you can be taken to the getter (i,e, _getVirtualField()) instead of the property annotation? Going to the annotation is fairly useless when its a virtual field.

Sounds fair. Do u have an idea on how to do that?
We can change it or add a feature flag to enable
Feel free to make a PR

I'd love to, but I wouldn't know where to start :-(

I never really looked into how the meta file works, but after spending a bit on this I don't believe what I asked is possible. This should probably be closed unless you think there is a way. Man do I despise virtual fields.

Well, and also: It should only be one click more to get to the method. So not too big of an issue anyway.
https://github.com/dereuromark/cakephp-ide-helper/blob/master/docs/Annotations.md#entity-virtual-field-settergetter-annotations

We are on an older version (1.14.1) of this library that doesn't have this feature. I guess I should figure out why cake 4.2 project had issues on the most recent version.