Skip to content

add support for laravel 9 #2346

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

Closed
Closed
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
8 changes: 4 additions & 4 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
php:
- '7.4'
- '8.0'
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
env:
DEBUG: ${{secrets.DEBUG}}
- name: Download Composer cache dependencies from cache
if: (!startsWith(matrix.php, '7.2'))
if: (!startsWith(matrix.php, '8.0'))
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache Composer dependencies
Expand All @@ -89,11 +89,11 @@ jobs:
key: ${{ matrix.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ matrix.os }}-composer-
- name: Install dependencies
if: (!startsWith(matrix.php, '7.2'))
if: (!startsWith(matrix.php, '8.0'))
run: |
composer install --no-interaction
- name: Run tests
if: (!startsWith(matrix.php, '7.2'))
if: (!startsWith(matrix.php, '8.0'))
run: |
./vendor/bin/phpunit --coverage-clover coverage.xml
env:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PHP_VERSION=7.4
ARG PHP_VERSION=8.0
ARG COMPOSER_VERSION=2.0

FROM composer:${COMPOSER_VERSION}
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
],
"license": "MIT",
"require": {
"illuminate/support": "^8.0",
"illuminate/container": "^8.0",
"illuminate/database": "^8.0",
"illuminate/events": "^8.0",
"illuminate/support": "^9.0",
"illuminate/container": "^9.0",
"illuminate/database": "^9.0",
"illuminate/events": "^9.0",
"mongodb/mongodb": "^1.6"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"orchestra/testbench": "^6.0",
"orchestra/testbench": "^7.0",
"mockery/mockery": "^1.3.1",
"doctrine/dbal": "^2.6"
},
Expand Down
6 changes: 5 additions & 1 deletion src/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -526,10 +526,14 @@ 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';

if ($values instanceof CarbonPeriod) {
$values = $values->toArray();
}

$this->wheres[] = compact('column', 'type', 'boolean', 'values', 'not');

return $this;
Expand Down