@@ -3,7 +3,6 @@
namespace Illuminate\Queue\Connectors;

use IronMQ\IronMQ;
use Illuminate\Http\Request;
use Illuminate\Queue\IronQueue;
use Illuminate\Contracts\Encryption\Encrypter as EncrypterContract;

@@ -16,24 +15,15 @@ class IronConnector implements ConnectorInterface
*/
protected $crypt;

/**
* The current request instance.
*
* @var \Illuminate\Http\Request
*/
protected $request;

/**
* Create a new Iron connector instance.
*
* @param \Illuminate\Contracts\Encryption\Encrypter $crypt
* @param \Illuminate\Http\Request $request
* @return void
*/
public function __construct(EncrypterContract $crypt, Request $request)
public function __construct(EncrypterContract $crypt)
{
$this->crypt = $crypt;
$this->request = $request;
}

/**
@@ -56,6 +46,6 @@ public function connect(array $config)
$iron->ssl_verifypeer = $config['ssl_verifypeer'];
}

return new IronQueue($iron, $this->request, $config['queue'], $config['encrypt']);
return new IronQueue($iron, $config['queue'], $config['encrypt']);
}
}

This file was deleted.

@@ -3,7 +3,6 @@
namespace Illuminate\Queue;

use IronMQ\IronMQ;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Queue\Jobs\IronJob;
use Illuminate\Contracts\Queue\Queue as QueueContract;
@@ -17,13 +16,6 @@ class IronQueue extends Queue implements QueueContract
*/
protected $iron;

/**
* The current request instance.
*
* @var \Illuminate\Http\Request
*/
protected $request;

/**
* The name of the default tube.
*
@@ -42,15 +34,13 @@ class IronQueue extends Queue implements QueueContract
* Create a new IronMQ queue instance.
*
* @param \IronMQ\IronMQ $iron
* @param \Illuminate\Http\Request $request
* @param string $default
* @param bool $shouldEncrypt
* @return void
*/
public function __construct(IronMQ $iron, Request $request, $default, $shouldEncrypt = false)
public function __construct(IronMQ $iron, $default, $shouldEncrypt = false)
{
$this->iron = $iron;
$this->request = $request;
$this->default = $default;
$this->shouldEncrypt = $shouldEncrypt;
}
@@ -152,47 +142,6 @@ public function deleteMessage($queue, $id)
$this->iron->deleteMessage($queue, $id);
}

/**
* Marshal a push queue request and fire the job.
*
* @return \Illuminate\Http\Response
*
* @deprecated since version 5.1
*/
public function marshal()
{
$this->createPushedIronJob($this->marshalPushedJob())->fire();

return new Response('OK');
}

/**
* Marshal out the pushed job and payload.
*
* @return object
*/
protected function marshalPushedJob()
{
$r = $this->request;

$body = $this->parseJobBody($r->getContent());

return (object) [
'id' => $r->header('iron-message-id'), 'body' => $body, 'pushed' => true,
];
}

/**
* Create a new IronJob for a pushed job.
*
* @param object $job
* @return \Illuminate\Queue\Jobs\IronJob
*/
protected function createPushedIronJob($job)
{
return new IronJob($this->container, $this, $job, true);
}

/**
* Create a payload string from the given job and data.
*
@@ -239,25 +188,4 @@ public function getIron()
{
return $this->iron;
}

/**
* Get the request instance.
*
* @return \Symfony\Component\HttpFoundation\Request
*/
public function getRequest()
{
return $this->request;
}

/**
* Set the request instance.
*
* @param \Symfony\Component\HttpFoundation\Request $request
* @return void
*/
public function setRequest(Request $request)
{
$this->request = $request;
}
}
@@ -46,18 +46,6 @@ public function laterOn($queue, $delay, $job, $data = '')
return $this->later($delay, $job, $data, $queue);
}

/**
* Marshal a push queue request and fire the job.
*
* @throws \RuntimeException
*
* @deprecated since version 5.1
*/
public function marshal()
{
throw new RuntimeException('Push queues only supported by Iron.');
}

/**
* Push an array of jobs onto the queue.
*