Skip to content

Commit 7b7ab22

Browse files
authored
Bump versions for Laravel 8.x (#19)
* Bump versions for Laravel 8.x * Fix: Omit version * Fix for laravel/framework#31073 * Doc: Add URLs
1 parent eeb5004 commit 7b7ab22

File tree

5 files changed

+32
-11
lines changed

5 files changed

+32
-11
lines changed

.scrutinizer.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ filter:
1010
build:
1111

1212
environment:
13-
php: '7.3'
13+
php: '7.4'
1414

1515
dependencies:
1616
before:
@@ -20,7 +20,7 @@ build:
2020
tests:
2121
override:
2222
-
23-
command: 'phpdbg -qrr vendor/bin/phpunit --coverage-clover build/logs/clover.xml'
23+
command: 'vendor/bin/phpunit --coverage-clover build/logs/clover.xml'
2424
coverage:
2525
file: 'build/logs/clover.xml'
2626
format: 'clover'

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ language: php
22

33
matrix:
44
exclude:
5+
- env: LARAVEL_VERSION=^8.0 TESTBENCH_VERSION=^6.0
6+
php: 7.2
7+
- env: LARAVEL_VERSION=^8.0 TESTBENCH_VERSION=^6.0
8+
php: 7.1
59
- env: LARAVEL_VERSION=^7.0 TESTBENCH_VERSION=^5.0
610
php: 7.1
711
- env: LARAVEL_VERSION=^6.0 TESTBENCH_VERSION=^4.0
@@ -19,6 +23,7 @@ cache:
1923
- $HOME/.composer/cache
2024

2125
env:
26+
- LARAVEL_VERSION=^8.0 TESTBENCH_VERSION=^6.0
2227
- LARAVEL_VERSION=^7.0 TESTBENCH_VERSION=^5.0
2328
- LARAVEL_VERSION=^6.0 TESTBENCH_VERSION=^4.0
2429
- LARAVEL_VERSION=5.8.* TESTBENCH_VERSION=3.8.*

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Guarantee database stickiness over the same user's consecutive requests.
55
## Requirements
66

77
- PHP: ^7.1
8-
- Laravel: ^5.8 || ^6.0 || ^7.0
8+
- Laravel: ^5.8 || ^6.0 || ^7.0 || ^8.0
99

1010
## Installing
1111

composer.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,16 @@
2121
}
2222
},
2323
"require": {
24-
"php": "^7.1",
24+
"php": "^7.1 || ^8.0",
2525
"ext-pdo": "*",
26-
"illuminate/container": "^5.8 || ^6.0 || ^7.0 || ^8.0",
27-
"illuminate/contracts": "^5.8 || ^6.0 || ^7.0 || ^8.0",
28-
"illuminate/database": "^5.8 || ^6.0 || ^7.0 || ^8.0",
29-
"illuminate/queue": "^5.8 || ^6.0 || ^7.0 || ^8.0",
30-
"illuminate/support": "^5.8 || ^6.0 || ^7.0 || ^8.0"
26+
"illuminate/container": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0",
27+
"illuminate/contracts": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0",
28+
"illuminate/database": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0",
29+
"illuminate/queue": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0",
30+
"illuminate/support": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
3131
},
3232
"require-dev": {
33-
"orchestra/testbench": "^5.0",
34-
"laravel/framework": "^7.0",
33+
"orchestra/testbench": "^6.0",
3534
"php-coveralls/php-coveralls": "^2.1",
3635
"friendsofphp/php-cs-fixer": "^2.15",
3736
"mockery/mockery": "^1.3"

tests/Feature/InitializingTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Mpyw\LaravelCachedDatabaseStickiness\Tests\Feature;
44

5+
use Illuminate\Contracts\Mail\Factory as MailerFactory;
56
use Illuminate\Contracts\Mail\Mailer;
67
use Illuminate\Http\Request;
78
use Illuminate\Notifications\AnonymousNotifiable;
@@ -178,6 +179,14 @@ public function testInitializationForNotifications(): void
178179
{
179180
$this->mock(Mailer::class)->shouldReceive('send');
180181

182+
// [7.x] Multiple Mailers Per App
183+
// https://github.com/laravel/framework/pull/31073
184+
if (interface_exists(MailerFactory::class)) {
185+
$this->mock(MailerFactory::class)
186+
->shouldReceive('mailer')
187+
->andReturn($this->app->make(Mailer::class));
188+
}
189+
181190
DB::connection();
182191

183192
$this->assertFalse($this->getRecordsModifiedViaReflection());
@@ -202,6 +211,14 @@ public function testInitializationForMailables(): void
202211
{
203212
$this->mock(Mailer::class)->shouldReceive('send');
204213

214+
// [7.x] Multiple Mailers Per App
215+
// https://github.com/laravel/framework/pull/31073
216+
if (interface_exists(MailerFactory::class)) {
217+
$this->mock(MailerFactory::class)
218+
->shouldReceive('mailer')
219+
->andReturn($this->app->make(Mailer::class));
220+
}
221+
205222
DB::connection();
206223

207224
$this->assertFalse($this->getRecordsModifiedViaReflection());

0 commit comments

Comments
 (0)