You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[9.x] Fix schedule:list crash when call() is given class-string (#45306)
* [9.x] Fix schedule:list crash when call() is given class-string
When creating schedule of the form:
```php
$this->schedule->call(FooCall::class);
$this->schedule->call([FooCall::class, 'fooFunction']);
```
Then the `ScheduleListCommand::getClosureLocation()` method would crash with:
```
TypeError
Cannot use "::class" on value of type string
```
This PR fixes it by adding checks for string `$callback` and returning that string instead of adding `::class` to it.
Tests for both single string and array callable syntax included.
* Streamlined the array callable fix
0 commit comments