Skip to content
This repository was archived by the owner on Nov 5, 2025. It is now read-only.

Commit 81c6296

Browse files
committed
Extend SyncQueue instead of abstract
No need to implement the interface, so should work on both L4 + L5. Fixes #14
1 parent 7ed454f commit 81c6296

File tree

3 files changed

+8
-34
lines changed

3 files changed

+8
-34
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "barryvdh/laravel-async-queue",
3-
"description": "",
3+
"description": "Async Queue Driver for Laravel (Push to background)",
44
"authors": [
55
{
66
"name": "Barry vd. Heuvel",
@@ -9,8 +9,8 @@
99
],
1010
"require": {
1111
"php": ">=5.3.0",
12-
"illuminate/support": "~4.0",
13-
"illuminate/console": "~4.0",
12+
"illuminate/support": "4.x|5.0.x",
13+
"illuminate/console": "4.x|5.0.x",
1414
"symfony/process": "~2.3"
1515
},
1616
"autoload": {

readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Laravel 4 Async Queue Driver
1+
# Laravel 4/5 Async Queue Driver
22

33
## Push a function/closure to the background.
44

@@ -10,9 +10,9 @@ This package is more usable as an alternative for running incidental tasks in th
1010
1111
### Install
1212

13-
Add the package to the require section of your composer.json and run `composer update`
13+
Require the latest version of this package with Composer
1414

15-
"barryvdh/laravel-async-queue": "0.2.x"
15+
composer require barryvdh/laravel-async-queue
1616

1717
Add the Service Provider to the providers array in config/app.php
1818

src/AsyncQueue.php

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
namespace Barryvdh\Queue;
33

44
use Barryvdh\Queue\Models\Job;
5-
use Illuminate\Queue\Queue;
6-
use Illuminate\Queue\QueueInterface;
5+
use Illuminate\Queue\SyncQueue;
76
use Symfony\Component\Process\PhpExecutableFinder;
87

9-
class AsyncQueue extends Queue implements QueueInterface
8+
class AsyncQueue extends SyncQueue
109
{
1110
/** @var PhpExecutableFinder */
1211
protected $phpfinder;
@@ -122,29 +121,4 @@ public function later($delay, $job, $data = '', $queue = null)
122121
return 0;
123122
}
124123

125-
/**
126-
* Pop the next job off of the queue.
127-
*
128-
* @param string|null $queue
129-
*
130-
* @return void
131-
*/
132-
public function pop($queue = null)
133-
{
134-
// do nothing
135-
}
136-
137-
/**
138-
* Push a raw payload onto the queue.
139-
*
140-
* @param string $payload
141-
* @param string|null $queue
142-
* @param array $options
143-
*
144-
* @return void
145-
*/
146-
public function pushRaw($payload, $queue = null, array $options = array())
147-
{
148-
// do nothing
149-
}
150124
}

0 commit comments

Comments
 (0)