title: Uncaught Error: Class 'PhpAmqpLib\Connection\AMQPStreamConnection' not found
body: <p>I have installed RabbitMQ, Composer and its dependencies like vendor folder and phpamqplib successfully.</p>
  
  <p>But, still it is giving me an error that AMQPStreamConnection not found.
  Can anyone help me?
  Here, is my code-</p>
  
  <pre><code>&lt;?php
  require_once __DIR__ . '/vendor/autoload.php';
  use PhpAmqpLib\Connection\AMQPStreamConnection;
  use PhpAmqpLib\Message\AMQPMessage;
  $connection = new AMQPStreamConnection('localhost', 15672, 'guest', 'guest');
  $channel = $connection-&gt;channel();
  $channel-&gt;queue_declare('task_queue', false, true, false, false);
  $data = implode(' ', array_slice($argv, 1));
  if (empty($data)) {
      $data = "Hello World!";
  }
  $msg = new AMQPMessage(
      $data,
      array('delivery_mode' =&gt; AMQPMessage::DELIVERY_MODE_PERSISTENT)
  );
  $channel-&gt;basic_publish($msg, '', 'task_queue');
  echo ' [x] Sent ', $data, "\n";
  $channel-&gt;close();
  $connection-&gt;close();
  ?&gt;
  </code></pre>