Skip to content

Commit cf0cc5a

Browse files
authored
Added support for Laravel 9.x (#19)
1 parent 66d1bb8 commit cf0cc5a

File tree

4 files changed

+62
-9
lines changed

4 files changed

+62
-9
lines changed

.github/workflows/run-tests-l8.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: "Run Tests - Laravel 8"
22

33
on:
44
push:
5-
branches: [ v4.x, master ]
5+
branches: [ v4.x ]
66

77
pull_request:
8-
branches: [ v4.x, master ]
8+
branches: [ v4.x ]
99

1010
jobs:
1111
tests:

.github/workflows/run-tests-l9.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "Run Tests - Laravel 9"
2+
3+
on:
4+
push:
5+
branches: [ v5.x, master ]
6+
7+
pull_request:
8+
branches: [ v5.x, master ]
9+
10+
jobs:
11+
tests:
12+
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
php: [8.0]
18+
laravel: [9.*]
19+
include:
20+
- laravel: 9.*
21+
testbench: 7.*
22+
23+
name: P${{ matrix.php }} - L${{ matrix.laravel }}
24+
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v2
28+
29+
- name: Setup PHP
30+
uses: shivammathur/setup-php@v2
31+
with:
32+
php-version: ${{ matrix.php }}
33+
extensions: pdo, sqlite, pdo_sqlite
34+
35+
- name: Install Dependencies
36+
run: composer install
37+
38+
- name: Execute tests
39+
run: vendor/bin/phpunit

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ A MongoDB cache driver for Laravel
66
|-------------------------|-------------------------|----------------------------------------------------|
77
| 5.7.x | 2.11.x | composer require 1ff/laravel-mongodb-cache:~2.11.0 |
88
| 5.8.x, 6.x | 2.12.x | composer require 1ff/laravel-mongodb-cache:~2.12.0 |
9-
| 7.x | 3.x.x | composer require 1ff/laravel-mongodb-cache:^3.0 |
9+
| 7.x | 3.x.x | composer require 1ff/laravel-mongodb-cache:^3.1 |
1010
| 8.x | 4.x.x | composer require 1ff/laravel-mongodb-cache:^4.1 |
11-
| 9.x | 5.x.x | Comming soon |
11+
| 9.x | 5.x.x | composer require 1ff/laravel-mongodb-cache:^5.0 |
1212

1313
Installation
1414
------------
@@ -32,10 +32,24 @@ Add the mongodb cache store in `config/cache.php`
3232
'connection' => 'mongodb',
3333
],
3434
],
35-
35+
36+
Add the mongodb database connection in `config/database.php`
37+
38+
'connections' => [
39+
...
40+
41+
'mongodb' => [
42+
'driver' => 'mongodb',
43+
'dsn' => env('MONGODB_DSN'),
44+
'database' => env('MONGODB_DATABASE'),
45+
],
46+
],
47+
3648
Update your .env file and change the `CACHE_DRIVER` to mongodb
3749

3850
CACHE_DRIVER=mongodb
51+
MONGODB_DSN=mongodb://localhost:27017/laravel
52+
MONGODB_DATABASE=laravel
3953

4054
Advantages
4155
----------

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
"name": "1ff/laravel-mongodb-cache",
33
"description": "A mongodb cache driver for laravel",
44
"type": "library",
5-
"version": "4.1.0",
5+
"version": "5.0.0",
66
"require": {
7-
"jenssegers/mongodb": "~3.8",
8-
"illuminate/cache": "^8.0"
7+
"jenssegers/mongodb": "~3.9",
8+
"illuminate/cache": "^9.0"
99
},
1010
"require-dev": {
11-
"orchestra/testbench": "^6.0"
11+
"orchestra/testbench": "^7.0"
1212
},
1313
"license": "MIT",
1414
"authors": [

0 commit comments

Comments
 (0)