Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/run-tests-l8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: "Run Tests - Laravel 8"

on:
push:
branches: [ v4.x, master ]
branches: [ v4.x ]

pull_request:
branches: [ v4.x, master ]
branches: [ v4.x ]

jobs:
tests:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/run-tests-l9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "Run Tests - Laravel 9"

on:
push:
branches: [ v5.x, master ]

pull_request:
branches: [ v5.x, master ]

jobs:
tests:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.0]
laravel: [9.*]
include:
- laravel: 9.*
testbench: 7.*

name: P${{ matrix.php }} - L${{ matrix.laravel }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: pdo, sqlite, pdo_sqlite

- name: Install Dependencies
run: composer install

- name: Execute tests
run: vendor/bin/phpunit
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ A MongoDB cache driver for Laravel
|-------------------------|-------------------------|----------------------------------------------------|
| 5.7.x | 2.11.x | composer require 1ff/laravel-mongodb-cache:~2.11.0 |
| 5.8.x, 6.x | 2.12.x | composer require 1ff/laravel-mongodb-cache:~2.12.0 |
| 7.x | 3.x.x | composer require 1ff/laravel-mongodb-cache:^3.0 |
| 7.x | 3.x.x | composer require 1ff/laravel-mongodb-cache:^3.1 |
| 8.x | 4.x.x | composer require 1ff/laravel-mongodb-cache:^4.1 |
| 9.x | 5.x.x | Comming soon |
| 9.x | 5.x.x | composer require 1ff/laravel-mongodb-cache:^5.0 |

Installation
------------
Expand All @@ -32,10 +32,24 @@ Add the mongodb cache store in `config/cache.php`
'connection' => 'mongodb',
],
],


Add the mongodb database connection in `config/database.php`

'connections' => [
...

'mongodb' => [
'driver' => 'mongodb',
'dsn' => env('MONGODB_DSN'),
'database' => env('MONGODB_DATABASE'),
],
],

Update your .env file and change the `CACHE_DRIVER` to mongodb

CACHE_DRIVER=mongodb
MONGODB_DSN=mongodb://localhost:27017/laravel
MONGODB_DATABASE=laravel

Advantages
----------
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"name": "1ff/laravel-mongodb-cache",
"description": "A mongodb cache driver for laravel",
"type": "library",
"version": "4.1.0",
"version": "5.0.0",
"require": {
"jenssegers/mongodb": "~3.8",
"illuminate/cache": "^8.0"
"jenssegers/mongodb": "~3.9",
"illuminate/cache": "^9.0"
},
"require-dev": {
"orchestra/testbench": "^6.0"
"orchestra/testbench": "^7.0"
},
"license": "MIT",
"authors": [
Expand Down