Skip to content

Commit 72593f3

Browse files
committed
Merge pull request rabbitmq#77 from jeffreydwalter/master
AMQPConnection class is deprecated.
2 parents 1300721 + 68241ac commit 72593f3

12 files changed

+24
-24
lines changed

php/emit_log.php

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

33
require_once __DIR__ . '/vendor/autoload.php';
4-
use PhpAmqpLib\Connection\AMQPConnection;
4+
use PhpAmqpLib\Connection\AMQPStreamConnection;
55
use PhpAmqpLib\Message\AMQPMessage;
66

7-
$connection = new AMQPConnection('localhost', 5672, 'guest', 'guest');
7+
$connection = new AMQPStreamConnection('localhost', 5672, 'guest', 'guest');
88
$channel = $connection->channel();
99

1010

php/emit_log_direct.php

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

33
require_once __DIR__ . '/vendor/autoload.php';
4-
use PhpAmqpLib\Connection\AMQPConnection;
4+
use PhpAmqpLib\Connection\AMQPStreamConnection;
55
use PhpAmqpLib\Message\AMQPMessage;
66

7-
$connection = new AMQPConnection('localhost', 5672, 'guest', 'guest');
7+
$connection = new AMQPStreamConnection('localhost', 5672, 'guest', 'guest');
88
$channel = $connection->channel();
99

1010
$channel->exchange_declare('direct_logs', 'direct', false, false, false);

php/emit_log_topic.php

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

33
require_once __DIR__ . '/vendor/autoload.php';
4-
use PhpAmqpLib\Connection\AMQPConnection;
4+
use PhpAmqpLib\Connection\AMQPStreamConnection;
55
use PhpAmqpLib\Message\AMQPMessage;
66

7-
$connection = new AMQPConnection('localhost', 5672, 'guest', 'guest');
7+
$connection = new AMQPStreamConnection('localhost', 5672, 'guest', 'guest');
88
$channel = $connection->channel();
99

1010

php/new_task.php

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

33
require_once __DIR__ . '/vendor/autoload.php';
4-
use PhpAmqpLib\Connection\AMQPConnection;
4+
use PhpAmqpLib\Connection\AMQPStreamConnection;
55
use PhpAmqpLib\Message\AMQPMessage;
66

7-
$connection = new AMQPConnection('localhost', 5672, 'guest', 'guest');
7+
$connection = new AMQPStreamConnection('localhost', 5672, 'guest', 'guest');
88
$channel = $connection->channel();
99

1010

php/receive.php

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

33
require_once __DIR__ . '/vendor/autoload.php';
4-
use PhpAmqpLib\Connection\AMQPConnection;
4+
use PhpAmqpLib\Connection\AMQPStreamConnection;
55

6-
$connection = new AMQPConnection('localhost', 5672, 'guest', 'guest');
6+
$connection = new AMQPStreamConnection('localhost', 5672, 'guest', 'guest');
77
$channel = $connection->channel();
88

99

php/receive_logs.php

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

33
require_once __DIR__ . '/vendor/autoload.php';
4-
use PhpAmqpLib\Connection\AMQPConnection;
4+
use PhpAmqpLib\Connection\AMQPStreamConnection;
55

6-
$connection = new AMQPConnection('localhost', 5672, 'guest', 'guest');
6+
$connection = new AMQPStreamConnection('localhost', 5672, 'guest', 'guest');
77
$channel = $connection->channel();
88

99

php/receive_logs_direct.php

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

33
require_once __DIR__ . '/vendor/autoload.php';
4-
use PhpAmqpLib\Connection\AMQPConnection;
4+
use PhpAmqpLib\Connection\AMQPStreamConnection;
55

6-
$connection = new AMQPConnection('localhost', 5672, 'guest', 'guest');
6+
$connection = new AMQPStreamConnection('localhost', 5672, 'guest', 'guest');
77
$channel = $connection->channel();
88

99
$channel->exchange_declare('direct_logs', 'direct', false, false, false);

php/receive_logs_topic.php

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

33
require_once __DIR__ . '/vendor/autoload.php';
4-
use PhpAmqpLib\Connection\AMQPConnection;
4+
use PhpAmqpLib\Connection\AMQPStreamConnection;
55

6-
$connection = new AMQPConnection('localhost', 5672, 'guest', 'guest');
6+
$connection = new AMQPStreamConnection('localhost', 5672, 'guest', 'guest');
77
$channel = $connection->channel();
88

99
$channel->exchange_declare('topic_logs', 'topic', false, false, false);

php/rpc_client.php

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

33
require_once __DIR__ . '/vendor/autoload.php';
4-
use PhpAmqpLib\Connection\AMQPConnection;
4+
use PhpAmqpLib\Connection\AMQPStreamConnection;
55
use PhpAmqpLib\Message\AMQPMessage;
66

77
class FibonacciRpcClient {
@@ -12,7 +12,7 @@ class FibonacciRpcClient {
1212
private $corr_id;
1313

1414
public function __construct() {
15-
$this->connection = new AMQPConnection(
15+
$this->connection = new AMQPStreamConnection(
1616
'localhost', 5672, 'guest', 'guest');
1717
$this->channel = $this->connection->channel();
1818
list($this->callback_queue, ,) = $this->channel->queue_declare(

php/rpc_server.php

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

33
require_once __DIR__ . '/vendor/autoload.php';
4-
use PhpAmqpLib\Connection\AMQPConnection;
4+
use PhpAmqpLib\Connection\AMQPStreamConnection;
55
use PhpAmqpLib\Message\AMQPMessage;
66

7-
$connection = new AMQPConnection('localhost', 5672, 'guest', 'guest');
7+
$connection = new AMQPStreamConnection('localhost', 5672, 'guest', 'guest');
88
$channel = $connection->channel();
99

1010
$channel->queue_declare('rpc_queue', false, false, false, false);

0 commit comments

Comments
 (0)