diff --git a/.github/workflows/build-ci.yml b/.github/workflows/build-ci.yml index 023def9be..24065ad2e 100644 --- a/.github/workflows/build-ci.yml +++ b/.github/workflows/build-ci.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: php: - - '7.4' + - '8.0' steps: - name: Checkout uses: actions/checkout@v2 @@ -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 @@ -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: diff --git a/Dockerfile b/Dockerfile index e8b6b4d2e..aa4fdb95a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG PHP_VERSION=7.4 +ARG PHP_VERSION=8.0 ARG COMPOSER_VERSION=2.0 FROM composer:${COMPOSER_VERSION} diff --git a/composer.json b/composer.json index 5522a67a6..e6f00302b 100644 --- a/composer.json +++ b/composer.json @@ -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" }, diff --git a/src/Query/Builder.php b/src/Query/Builder.php index de3265cb6..e0461277e 100644 --- a/src/Query/Builder.php +++ b/src/Query/Builder.php @@ -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;