Closed dereuromark closed 2 years ago
This reminds me of virtual fields where you don't get directly to the _getMyVirtualField()
function if you click on a virtual field but rather the property. In that case one still get to the correct class though so its not that big of a deal.
In your ReleaseForm example one would have to click on the new ReleaseForm()
to get to the correct class though.
Yes, but only class, not the method itself, and it can sometimes be in different files, if you pass the object around...
It is also bad for beginners, as they dont find the code to it, or dont understand how it continues here.
Cake\Form\Form
is sometime used directly without a project form class ?
Maybe Form::execute()
could be abstract.
Yes, extra code in each App Form class to set data and validate but maybe more clear.
edit : not a right plugin answer but framework one ... sorry
@ADmad @dakota What is your take on these things?
"Linking" the execute()
call to the _execute()
hook method seems like good usability.
Similar problem with
/** @uses \App\Mailer\NotificationMailer::notify() */
$this->mailer->send('notify', [$releasesToNotify, $releaseData, $pr]);
otherwise linking to
public function send(?string $action = null, array $args = [], array $headers = []): array
of Mailer itself, which does easily confuse people probably, when looking for what it actually does.
I think both of those are only properly solvable by rector (as it needs to know the object type at runtime). maybe we should add those there instead?
The form part is tackled in https://github.com/dereuromark/cakephp-ide-helper/pull/259 Someone else can maybe replicate the same with the Mailer class? Should be straight forward
What I found useful to add - manually for now:
As clicking on execute() directly brings you to
of Cake\Form\Form, and not to the actual code behind it, which is inside
of my App\Form\ReleaseForm class
We could add this to all such calls as inline annotation.
What do others think? or is there a better solution?