Skip to content

Commit f5a546c

Browse files
authored
Updated require-dev dependencies and QlessConnector for supporting Laravel 6.20.* (#15)
1 parent 26dbae1 commit f5a546c

File tree

4 files changed

+19
-16
lines changed

4 files changed

+19
-16
lines changed

.travis.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ sudo: false
22

33
language: php
44
php:
5+
- '7.4'
56
- '7.3'
67
- '7.2'
78
- '7.1'
@@ -72,19 +73,19 @@ notifications:
7273
jobs:
7374
include:
7475
- stage: Static Code Analysis
75-
php: 7.2
76+
php: 7.4
7677
env: PHPStan
7778
script:
7879
- ./vendor/bin/phpstan analyse src/ --level max
7980
- stage: Static Code Analysis
80-
php: 7.2
81+
php: 7.4
8182
env: PHP_CodeSniffer
8283
before_script:
8384
- phpenv config-rm xdebug.ini || true
8485
script:
8586
- ./vendor/bin/phpcs src
8687
- stage: Mutation Testing
87-
php: 7.2
88+
php: 7.4
8889
script:
8990
- ./vendor/bin/phpunit --disallow-test-output
9091
- $HOME/bin/infection --threads=4

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
"pdffiller/qless-php": "^3.13"
2020
},
2121
"require-dev": {
22-
"illuminate/events": "5.6.*|5.7.*",
22+
"illuminate/events": "5.6.*|5.7.*|^6.20",
2323
"infection/infection": "^0.12.0",
2424
"orchestra/testbench": "~3.0",
2525
"phpstan/phpstan": "^0.11.1",
26-
"phpunit/phpunit": ">=5.3 <8.0",
26+
"phpunit/phpunit": ">=5.3 <8.0 | ^8.2",
2727
"squizlabs/php_codesniffer": "^3.4"
2828
},
2929
"autoload": {

src/Queue/QlessConnector.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace LaravelQless\Queue;
44

55
use Illuminate\Queue\Connectors\ConnectorInterface;
6+
use Illuminate\Support\Arr;
67
use Illuminate\Support\Facades\Config;
78
use Qless\Client;
89

@@ -21,7 +22,7 @@ class QlessConnector implements ConnectorInterface
2122
*/
2223
public function connect(array $config): QlessQueue
2324
{
24-
$redisConnection = array_get($config, 'redis_connection', 'qless');
25+
$redisConnection = Arr::get($config, 'redis_connection', 'qless');
2526

2627
$redisConfig = Config::get('database.redis.' . $redisConnection, []);
2728

tests/Queue/QueueTest.php

+11-10
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
namespace LaravelQless\Tests\Queue;
44

5+
use Illuminate\Contracts\Queue\Queue as QueueContract;
6+
use Illuminate\Queue\Queue;
57
use Illuminate\Queue\QueueManager;
8+
use Illuminate\Support\Str;
69
use LaravelQless\Contracts\JobHandler;
710
use LaravelQless\Handler\DefaultHandler;
811
use LaravelQless\Job\QlessJob;
912
use LaravelQless\Queue\QlessConnector;
1013
use LaravelQless\Queue\QlessQueue;
1114
use Orchestra\Testbench\TestCase;
12-
use Illuminate\Contracts\Queue\Queue as QueueContract;
13-
use Illuminate\Queue\Queue;
1415
use Qless\Client;
1516

1617
class QueueTest extends TestCase
@@ -40,7 +41,7 @@ public function testPushPop()
4041
{
4142
$queue = $this->getQueue();
4243

43-
$queueName = str_random(16);
44+
$queueName = Str::random(16);
4445

4546
$jobId = $queue->push(Job::class, ['firstKey' => 'firstValue'], $queueName);
4647

@@ -66,7 +67,7 @@ public function testSubscribe()
6667
{
6768
$queue = $this->getQueue();
6869

69-
$queuePrefix = str_random(4) . '_';
70+
$queuePrefix = Str::random(4) . '_';
7071

7172
for ($i = 1; $i<=3; $i++) {
7273
$queue->push(Job::class, ['firstKey' => 'firstValue'], $queuePrefix . $i);
@@ -102,7 +103,7 @@ public function testUnSubscribe()
102103
{
103104
$queue = $this->getQueue();
104105

105-
$queuePrefix = str_random(4) . '_';
106+
$queuePrefix = Str::random(4) . '_';
106107

107108
for ($i = 1; $i<=2; $i++) {
108109
$queue->push(Job::class, ['firstKey' => 'firstValue'], $queuePrefix . $i);
@@ -130,7 +131,7 @@ public function testUnSubscribe()
130131
*/
131132
public function testSize()
132133
{
133-
$queueName = str_random();
134+
$queueName = Str::random();
134135

135136
$queue = $this->getQueue();
136137

@@ -152,9 +153,9 @@ public function testSize()
152153
*/
153154
public function testJobOptions()
154155
{
155-
$queueName = str_random();
156+
$queueName = Str::random();
156157

157-
$jid = str_random(16);
158+
$jid = Str::random(16);
158159

159160
$queue = $this->getQueue();
160161

@@ -179,7 +180,7 @@ public function testDispatchJob()
179180
{
180181
$this->setEnv();
181182

182-
$queueName = str_random();
183+
$queueName = Str::random();
183184

184185
$job = new Job(['dispatch' => 'work']);
185186

@@ -203,7 +204,7 @@ public function testDispatchNowJob()
203204
{
204205
$this->setEnv();
205206

206-
$queueName = str_random();
207+
$queueName = Str::random();
207208

208209
$dispatch = Job::dispatchNow(['dispatchNow' => 'work_as_sync'])
209210
->onQueue($queueName)

0 commit comments

Comments
 (0)