squigg / azure-queue-laravel

PHP Laravel Queue Driver package for Microsoft Azure Storage Queues
41 stars 24 forks source link

Laravel 5.7 not compatible #9

Closed yarbala closed 4 years ago

yarbala commented 5 years ago

Summary of issue

createPayload method call not compatible with Laravel 5.7 createPayload signature. Data not passed to job.

file: squigg/azure-queue-laravel/src/AzureQueue.php line 62

change

public function push($job, $data = '', $queue = null)
{
    $this->pushRaw($this->createPayload($job, $data), $queue);
}

to

public function push($job, $data = '', $queue = null)
{
    $this->pushRaw($this->createPayload($job, $queue, $data), $queue);
}

also shoud be fixed in "later" function like this:

    public function later($delay, $job, $data = '', $queue = null)
    {
        $payload = $this->createPayload($job, $queue, $data);

        $options = new CreateMessageOptions();
        $options->setVisibilityTimeoutInSeconds($this->secondsUntil($delay));

        $this->azure->createMessage($this->getQueue($queue), $payload, $options);
    }

Software versions This Package: Laravel: 5.7 PHP: 7.2 Operating System: Windows / Linux / MacOS

judgej commented 4 years ago

Is there a recommended fork or alternative package for later versions of Laravel?

squigg commented 4 years ago

Sorry I've been focusing on other non-Laravel projects recently.

I'll happily accept a PR for changes for this version and/or will try set aside some time to see what's needing changed for 5.8

judgej commented 4 years ago

We need this working in the next few days, so will supply a PR if not beaten to it.

squigg commented 4 years ago

Should be fixed in 5.7.1

judgej commented 4 years ago

Thanks, I'll have a play with it.