plugin icon indicating copy to clipboard operation
plugin copied to clipboard

[Feature request] Event listeners autocomplete and clickability for subscribers

Open zlodes opened this issue 4 years ago • 1 comments
trafficstars

Hi!

It is about Laravel event Subscribers: https://laravel.com/docs/8.x/events#writing-event-subscribers

There are two parts of the feature request.

  1. At first it will be cool to have listeners methods autocomplete (second array item of second argument):
public function subscribe(Dispatcher $events): void
{
    $events->listen(
        UserRegistered::class,
        [self::class, 'afterRegistrationSendNotification']
    );
}
  1. And it should be clickable (like a "go to declaration")

P.S.: It seems like as array-style of callable and it's behaviour.

P.P.S: And now the listener method is marked as unused: image

zlodes avatar Feb 26 '21 12:02 zlodes

Yes, and it will be cool, if subscriber" be in code-generation. like "Listener" all needs -- radio button in listener form, which one, listener or subscriber

trin4ik avatar Feb 22 '22 18:02 trin4ik

It's completed by PhpStorm now.

adelf avatar Dec 24 '23 18:12 adelf