Skip to content

Commit 160866c

Browse files
committed
upgrading to Laravel 4.2
1 parent d57a001 commit 160866c

File tree

5 files changed

+51
-51
lines changed

5 files changed

+51
-51
lines changed

README.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ RabbitMQ driver for Laravel
55

66
Require this package in your composer.json and run composer update:
77

8-
"fintech-fab/laravel-queue-rabbitmq": "4.1"
8+
"fintech-fab/laravel-queue-rabbitmq": "4.2"
99

1010
or run:
1111

@@ -19,39 +19,39 @@ After composer update is finished you need to add ServiceProvider to your `provi
1919

2020
now you are able to configure your connections in queue.php:
2121

22-
return array(
23-
24-
'default' => 'rabbitmq',
25-
26-
'connections' => array(
27-
28-
'rabbitmq' => array(
29-
'driver' => 'rabbitmq',
30-
31-
'host' => '',
32-
'port' => '',
33-
34-
'vhost' => '',
35-
'login' => '',
36-
'password' => '',
37-
38-
'queue' => '', // name of the default queue
39-
40-
'exchange_name' => '', // name of the exchange
41-
42-
// Type of your exchange
43-
// Can be AMQP_EX_TYPE_DIRECT or AMQP_EX_TYPE_FANOUT
44-
// see documentation for more info
45-
// http://www.rabbitmq.com/tutorials/amqp-concepts.html
46-
'exchange_type' => AMQP_EX_TYPE_DIRECT,
47-
'exchange_flags' => AMQP_DURABLE,
48-
49-
50-
),
51-
52-
),
53-
54-
);
22+
return [
23+
24+
'default' => 'rabbitmq',
25+
26+
'connections' => [
27+
28+
'rabbitmq' => [
29+
'driver' => 'rabbitmq',
30+
31+
'host' => '',
32+
'port' => '',
33+
34+
'vhost' => '',
35+
'login' => '',
36+
'password' => '',
37+
38+
'queue' => '', // name of the default queue
39+
40+
'exchange_name' => '', // name of the exchange
41+
42+
// Type of your exchange
43+
// Can be AMQP_EX_TYPE_DIRECT or AMQP_EX_TYPE_FANOUT
44+
// see documentation for more info
45+
// http://www.rabbitmq.com/tutorials/amqp-concepts.html
46+
'exchange_type' => AMQP_EX_TYPE_DIRECT,
47+
'exchange_flags' => AMQP_DURABLE,
48+
49+
50+
],
51+
52+
],
53+
54+
];
5555

5656
You can also find these examples in src/examples folder.
5757

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fintech-fab/laravel-queue-rabbitmq",
3-
"version": "4.1",
3+
"version": "4.2",
44
"description": "RabbitMQ driver for Laravel Queue",
55
"license": "Apache-2.0",
66
"authors": [
@@ -10,9 +10,9 @@
1010
}
1111
],
1212
"require": {
13-
"php": ">=5.3.0",
14-
"illuminate/support": "4.1.*@dev",
15-
"illuminate/queue": "4.1.*@dev"
13+
"php": ">=5.4.0",
14+
"illuminate/support": "4.2.*@dev",
15+
"illuminate/queue": "4.2.*@dev"
1616
},
1717
"suggest": {
1818
"ext-amqp": "PECL extension for the AMQP protocol - this is preferred"

src/FintechFab/LaravelQueueRabbitMQ/Queue/RabbitMQQueue.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function push($job, $data = '', $queue = null)
7777
* @throws \AMQPException
7878
* @return mixed
7979
*/
80-
public function pushRaw($payload, $queue = null, array $options = array())
80+
public function pushRaw($payload, $queue = null, array $options = [])
8181
{
8282
// get queue
8383
$queue = $this->declareQueue($queue);
@@ -212,11 +212,11 @@ public function declareDelayedQueue($destination, $delay)
212212
$queue = new AMQPQueue($this->channel);
213213
$queue->setName($name);
214214
$queue->setFlags(AMQP_DURABLE);
215-
$queue->setArguments(array(
215+
$queue->setArguments([
216216
'x-dead-letter-exchange' => $this->exchange->getName(),
217217
'x-dead-letter-routing-key' => $destination,
218218
'x-message-ttl' => $delay * 1000,
219-
));
219+
]);
220220

221221
$queue->declareQueue();
222222

src/examples/app.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
return array(
3+
return [
44

5-
'providers' => array(
5+
'providers' => [
66
'FintechFab\LaravelQueueRabbitMQ\LaravelQueueRabbitMQServiceProvider',
7-
),
7+
],
88

9-
);
9+
];

src/examples/queue.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
* you can add as many connections as you want
66
*/
77

8-
return array(
8+
return [
99

1010
'default' => 'rabbitmq',
1111

12-
'connections' => array(
12+
'connections' => [
1313

14-
'rabbitmq' => array(
14+
'rabbitmq' => [
1515
'driver' => 'rabbitmq',
1616

1717
'host' => '',
@@ -33,8 +33,8 @@
3333
'exchange_flags' => AMQP_DURABLE,
3434

3535

36-
),
36+
],
3737

38-
),
38+
],
3939

40-
);
40+
];

0 commit comments

Comments
 (0)