Skip to content
This repository was archived by the owner on Nov 9, 2020. It is now read-only.

Commit 3476c8e

Browse files
committed
Establish compatibility with Laravel >=5.7.7
1 parent 24f7713 commit 3476c8e

File tree

3 files changed

+297
-13
lines changed

3 files changed

+297
-13
lines changed

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
],
1111
"require": {
1212
"guzzlehttp/guzzle": "~6.0",
13-
"illuminate/queue": "^5.5 <5.7.7",
14-
"illuminate/support": "^5.5 <5.7.7",
15-
"illuminate/contracts": "^5.5 <5.7.7",
16-
"illuminate/routing": "^5.5 <5.7.7"
13+
"illuminate/queue": "^5.7 >=5.7.7",
14+
"illuminate/support": "^5.7 >=5.7.7",
15+
"illuminate/contracts": "^5.7 >=5.7.7",
16+
"illuminate/routing": "^5.7 >=5.7.7"
1717
},
1818
"autoload": {
1919
"psr-4": {
@@ -36,7 +36,7 @@
3636
}
3737
},
3838
"require-dev": {
39-
"laravel/laravel": "^5.5",
39+
"laravel/laravel": "^5.7",
4040
"phpunit/phpunit": "^7.4",
4141
"mockery/mockery": "^1.2"
4242
}

composer.lock

Lines changed: 279 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/RemoteQueue.php

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ public function size($queue = null)
6060
*/
6161
public function push($job, $data = '', $queue = null)
6262
{
63-
return $this->pushRaw($this->createPayload($job, $data), $queue);
63+
$queue = $this->getQueue($queue);
64+
65+
return $this->pushRaw($this->createPayload($job, $queue, $data), $queue);
6466
}
6567

6668
/**
@@ -119,27 +121,31 @@ protected function getQueue($queue)
119121
* Create a payload for an object-based queue handler.
120122
*
121123
* @param mixed $job
124+
* @param string $queue
122125
* @return array
123126
*/
124-
protected function createObjectPayload($job)
127+
protected function createObjectPayload($job, $queue)
125128
{
126-
return [
129+
$payload = $this->withCreatePayloadHooks($queue, []);
130+
131+
return array_merge($payload, [
127132
'job' => serialize(clone $job),
128-
];
133+
]);
129134
}
130135

131136
/**
132137
* Create a typical, string based queue payload array.
133138
*
134139
* @param string $job
140+
* @param string $queue
135141
* @param mixed $data
136142
* @return array
137143
*/
138-
protected function createStringPayload($job, $data)
144+
protected function createStringPayload($job, $queue, $data)
139145
{
140-
return [
146+
return $this->withCreatePayloadHooks($queue, [
141147
'job' => $job,
142148
'data' => $data,
143-
];
149+
]);
144150
}
145151
}

0 commit comments

Comments
 (0)