plugin icon indicating copy to clipboard operation
plugin copied to clipboard

[Bug]: incorrect void return type for dispatch method

Open stidges opened this issue 3 years ago • 2 comments

Bug description

Since recently it has become possible to generate auto-complete helpers for the dispatch method for classes using Laravel's Dispatchable trait. However, right now the return type for the method is generated as void, but it actually returns a \Illuminate\Foundation\Bus\PendingDispatch class which allows you to customize the dispatch further. Is it possible to update the return type in the _ide_helper_dispatches.php file?

Plugin version

5.7.3.221

Operating system

MacOS

Steps to reproduce

  1. Create a Job class which uses the Dispatchable trait
  2. Generate the helper code
  3. Check the _ide_helper_dispatches.php file
  4. The dispatch method is shown having a void return type

Relevant log output

No response

stidges avatar Aug 08 '22 10:08 stidges

For me is the same issue.

I use macOS Monterey and the latest plugin version 5.7.3.221

Code work fine (I'm developing with tests) and the test asserts my code sends four jobs dispatched with delay XXXXX.

castris 2022-08-21 a las 8 59 15

abkrim avatar Aug 21 '22 07:08 abkrim

This will be fixed. Thanks.

adelf avatar Aug 21 '22 07:08 adelf

Fixed in the 6.1 release. Thanks.

adelf avatar Nov 16 '22 15:11 adelf