Skip to content

Commit ab5d179

Browse files
committed
Merge pull request #3 from abachmann/master
Laravel 5 support added
2 parents edf3d2b + 0a97d89 commit ab5d179

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.idea
2-
vendor
2+
vendor
3+
composer.lock

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"videlalvaro/php-amqplib": "2.4.*"
99
},
1010
"require-dev": {
11-
"laravel/framework": "4.*",
11+
"laravel/framework": ">=4.0.0",
1212
"squizlabs/php_codesniffer": "1.*",
13-
"orchestra/testbench": "2.*",
13+
"orchestra/testbench": "3.0.4",
1414
"phpunit/phpunit": "4.3.*"
1515
},
1616
"autoload": {

src/Connectors/AmqpConnector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class AmqpConnector implements ConnectorInterface
1818
*
1919
* @param array $config
2020
*
21-
* @return \Illuminate\Queue\QueueInterface
21+
* @return \Illuminate\Queue\Queue
2222
*/
2323
public function connect(array $config)
2424
{

src/Jobs/AMQPJob.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Illuminate\Container\Container;
66
use Illuminate\Queue\Jobs\Job;
7-
use Illuminate\Queue\QueueInterface;
7+
use Illuminate\Queue\Queue;
88
use PhpAmqpLib\Channel\AMQPChannel;
99
use PhpAmqpLib\Message\AMQPMessage;
1010

@@ -106,12 +106,12 @@ public function release($delay = 0)
106106
$job = $body['job'];
107107
$data = $body['data'];
108108

109-
/** @var QueueInterface $queueInterface */
110-
$queueInterface = $this->container['queue']->connection();
109+
/** @var Queue $queue */
110+
$queue = $this->container['queue']->connection();
111111
if ($delay > 0) {
112-
$queueInterface->later($delay, $job, $data, $this->getQueue());
112+
$queue->later($delay, $job, $data, $this->getQueue());
113113
} else {
114-
$queueInterface->push($job, $data, $this->getQueue());
114+
$queue->push($job, $data, $this->getQueue());
115115
}
116116
}
117117

src/Queue/AMQPQueue.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use Forumhouse\LaravelAmqp\Exception\AMQPException;
66
use Forumhouse\LaravelAmqp\Jobs\AMQPJob;
77
use Illuminate\Queue\Queue;
8-
use Illuminate\Queue\QueueInterface;
98
use PhpAmqpLib\Channel\AMQPChannel;
109
use PhpAmqpLib\Connection\AMQPConnection;
1110
use PhpAmqpLib\Message\AMQPMessage;
@@ -15,7 +14,7 @@
1514
*
1615
* @package Forumhouse\LaravelAmqp\Queue
1716
*/
18-
class AMQPQueue extends Queue implements QueueInterface
17+
class AMQPQueue extends Queue
1918
{
2019
const EXCHANGE_TYPE_DIRECT = 'direct';
2120

tests/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)