Skip to content

Commit 2168886

Browse files
authored
Merge pull request #2 from kirschbaum-development/php-8
Support to PHP 8
2 parents d872a59 + 4f4f01c commit 2168886

File tree

5 files changed

+15
-13
lines changed

5 files changed

+15
-13
lines changed

Diff for: .github/workflows/ci.yml

+3-10
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,8 @@ jobs:
99
strategy:
1010
fail-fast: true
1111
matrix:
12-
php: [7.4]
13-
laravel: [7.*, 8.*]
14-
include:
15-
- laravel: 8.*
16-
testbench: 6.*
17-
- laravel: 7.*
18-
testbench: 7.*
12+
php: [7.4, 8.0]
13+
laravel: [8.*]
1914

2015
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
2116

@@ -42,9 +37,7 @@ jobs:
4237
coverage: none
4338

4439
- name: Install dependencies
45-
run: |
46-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
47-
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
40+
run: composer install
4841

4942
- name: Execute tests
5043
run: vendor/bin/phpunit

Diff for: composer.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^7.1"
19+
"php": "^7.1 || ^8.0"
2020
},
2121
"require-dev": {
22-
"orchestra/testbench": "^4.0",
22+
"orchestra/testbench": "^6.0",
23+
"laravel/framework": "^8.0",
24+
"laravel/legacy-factories": "^1.0",
2325
"phpunit/phpunit": "^8.0"
2426
},
2527
"autoload": {

Diff for: tests/BatchRetryCommandTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public function it_can_retry_all_jobs()
2525
public function making_sure_the_chunks_work()
2626
{
2727
$failedJobs = factory(FailedJob::class, 75)->create();
28+
$this->assertEquals(75, FailedJob::count());
2829

2930
Artisan::call('queue:failed:batch-retry');
3031

Diff for: tests/TestCase.php

+6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ public function setUp(): void
1414
$this->loadMigrationsFrom(__DIR__.'/database/migrations');
1515
}
1616

17+
protected function defineEnvironment($app)
18+
{
19+
$app['config']->set('queue.default', 'database');
20+
$app['config']->set('queue.failed.driver', 'database');
21+
}
22+
1723
protected function getPackageProviders($app)
1824
{
1925
return [BatchRetryServiceProvider::class];

Diff for: tests/database/factories/FailedJobFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
'connection' => 'database',
88
'queue' => 'default',
99
'payload' => [
10-
'displayName' => 'App\Jobs\SomeJob',
10+
'displayName' => 'App\\Jobs\\SomeJob',
1111
],
1212
'exception' => 'something',
1313
];

0 commit comments

Comments
 (0)