Closed heshamabdallah closed 2 years ago
Same error, only if i set
# SEND_JOBS_TO_RAY=true
Error
Call to undefined method Illuminate\Broadcasting\BroadcastEvent::payload()
From
vendor/spatie/laravel-ray/src/Payloads/JobEventPayload.php:23
public function __construct(object $event)
{
$this->event = $event;
$this->job = unserialize($event->job->payload()['data']['command']);
if (property_exists($event, 'exception')) {
$this->exception = $event->exception ?? null;
}
}
I'm going to close this issue because it's been inactive for a while. Let me know if you still need help with this problem!
Same issue here.
Steps to reproduce are pretty simple (In a Laravel environment):
1) Create an empty job php artisan make:job RayPayloadIssueJob
2) Set send_jobs_to_ray
to true
3) Make sure you have a queue set up and are not using the sync connection/driver (I am using the database connection)
3) Call dispatch(new RayPayloadIssueJob());
anywhere and the error should pop-up
@stein-j if you also know the fix, feel free to PR it 👍
I didn't know the fix, after checking the source code and distracting myself from what I was suppose to do today, here's a PR aha 🤫 https://github.com/spatie/laravel-ray/pull/245
Describe the bug I have the same issue described here #319
Versions spatie/laravel-ray version:
1.26.1
spatie/ray version:1.30.3
PHP version:8.0.12
Laravel version:^8.54
My Job
To Reproduce
Screenshots![Screenshot from 2021-11-02 01-53-42](https://user-images.githubusercontent.com/19722460/139757317-079d9092-b86e-409c-a8f3-d2947f0f662c.png)
Additional context I opened
vendor/spatie/laravel-ray/src/Payloads/JobEventPayload.php
and dumped the job methods and I can't find thepayload
method.. it seemsJobEventPayload
is missing a trait or something.