Skip to content

feat: initial laravel 9 compatibility #2344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
23 changes: 7 additions & 16 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,14 @@ jobs:
strategy:
matrix:
include:
- { os: ubuntu-latest, php: 7.2, mongodb: 3.6, experimental: true }
- { os: ubuntu-latest, php: 7.2, mongodb: '4.0', experimental: true }
- { os: ubuntu-latest, php: 7.2, mongodb: 4.2, experimental: true }
- { os: ubuntu-latest, php: 7.2, mongodb: 4.4, experimental: true }
- { os: ubuntu-latest, php: 7.3, mongodb: 3.6, experimental: false }
- { os: ubuntu-latest, php: 7.3, mongodb: '4.0', experimental: false }
- { os: ubuntu-latest, php: 7.3, mongodb: 4.2, experimental: false }
- { os: ubuntu-latest, php: 7.3, mongodb: 4.4, experimental: false }
- { os: ubuntu-latest, php: 7.4, mongodb: 3.6, experimental: false }
- { os: ubuntu-latest, php: 7.4, mongodb: '4.0', experimental: false }
- { os: ubuntu-latest, php: 7.4, mongodb: 4.2, experimental: false }
- { os: ubuntu-latest, php: 7.4, mongodb: 4.4, experimental: false }
- { os: ubuntu-latest, php: 8.0, mongodb: '4.0', experimental: false }
- { os: ubuntu-latest, php: 8.0, mongodb: 4.2, experimental: false }
- { os: ubuntu-latest, php: 8.0, mongodb: 4.4, experimental: false }
- { os: ubuntu-latest, php: 8.0, mongodb: '5.0', experimental: false }
- { os: ubuntu-latest, php: 8.1, mongodb: '4.0', experimental: false }
- { os: ubuntu-latest, php: 8.1, mongodb: 4.2, experimental: false }
- { os: ubuntu-latest, php: 8.1, mongodb: 4.4, experimental: false }
- { os: ubuntu-latest, php: 8.1, mongodb: '5.0', experimental: false }
services:
mongo:
image: mongo:${{ matrix.mongodb }}
Expand Down Expand Up @@ -78,22 +73,18 @@ jobs:
env:
DEBUG: ${{secrets.DEBUG}}
- name: Download Composer cache dependencies from cache
if: (!startsWith(matrix.php, '7.2'))
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache Composer dependencies
if: (!startsWith(matrix.php, '7.2'))
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ matrix.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ matrix.os }}-composer-
- name: Install dependencies
if: (!startsWith(matrix.php, '7.2'))
run: |
composer install --no-interaction
- name: Run tests
if: (!startsWith(matrix.php, '7.2'))
run: |
./vendor/bin/phpunit --coverage-clover coverage.xml
env:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

### Added
- Compatibility with Laravel 9.x [#](https://github.com/jenssegers/laravel-mongodb/pull/) by [@divine](https://github.com/divine).

## [3.8.4] - 2021-05-27

### Fixed
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Make sure you have the MongoDB PHP driver installed. You can find installation i

Laravel | Package | Maintained
:---------|:---------------|:----------
9.x | 3.9.x | :white_check_mark:
8.x | 3.8.x | :white_check_mark:
7.x | 3.7.x | :x:
6.x | 3.6.x | :white_check_mark:
Expand Down
20 changes: 11 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
],
"license": "MIT",
"require": {
"illuminate/support": "^8.0",
"illuminate/container": "^8.0",
"illuminate/database": "^8.0",
"illuminate/events": "^8.0",
"mongodb/mongodb": "^1.6"
"illuminate/support": "9.x-dev",
"illuminate/container": "9.x-dev",
"illuminate/database": "9.x-dev",
"illuminate/events": "9.x-dev",
"mongodb/mongodb": "^1.11"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you take the dev tag for this since laravel 9 is out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course but we won't be able to merge it as we don't have enough permissions to do so.

Thanks!

},
"require-dev": {
"phpunit/phpunit": "^9.0",
"orchestra/testbench": "^6.0",
"phpunit/phpunit": "^9.5.8",
"orchestra/testbench": "7.x-dev",
"mockery/mockery": "^1.3.1",
"doctrine/dbal": "^2.6"
"doctrine/dbal": "^2.13.3|^3.1.4"
},
"autoload": {
"psr-4": {
Expand All @@ -54,5 +54,7 @@
"Jenssegers\\Mongodb\\MongodbQueueServiceProvider"
]
}
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
2 changes: 1 addition & 1 deletion src/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ public function whereAll($column, array $values, $boolean = 'and', $not = false)
/**
* @inheritdoc
*/
public function whereBetween($column, array $values, $boolean = 'and', $not = false)
public function whereBetween($column, iterable $values, $boolean = 'and', $not = false)
{
$type = 'between';

Expand Down