Skip to content
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

[3.8] Laravel 8 support #2108

Merged
merged 7 commits into from
Sep 30, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,22 @@ 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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

### Added
- Laravel 8 support by [@divine](https://github.com/divine).

### Changed
- Updated versions of all dependencies by [@divine](https://github.com/divine).

## [3.7.0] - 2020-09-18

### Added
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Make sure you have the MongoDB PHP driver installed. You can find installation i
5.8.x | 3.5.x
6.x | 3.6.x
7.x | 3.7.x
8.x | 3.8.x

Install the package via Composer:

Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
],
"license": "MIT",
"require": {
"illuminate/support": "^7.0",
"illuminate/container": "^7.0",
"illuminate/database": "^7.0",
"illuminate/events": "^7.0",
"illuminate/support": "^8.0",
"illuminate/container": "^8.0",
"illuminate/database": "^8.0",
"illuminate/events": "^8.0",
"mongodb/mongodb": "^1.6"
},
"require-dev": {
"phpunit/phpunit": "^8.4|^9.0",
"orchestra/testbench": "^5.0",
"phpunit/phpunit": "^9.0",
"orchestra/testbench": "^6.0",
"mockery/mockery": "^1.3.1",
"doctrine/dbal": "^2.6"
},
Expand Down
20 changes: 6 additions & 14 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
<testsuites>
<testsuite name="all">
<directory>tests/</directory>
Expand Down Expand Up @@ -37,11 +34,6 @@
<file>tests/ValidationTest.php</file>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
<php>
<env name="MONGO_HOST" value="mongodb"/>
<env name="MONGO_DATABASE" value="unittest"/>
Expand Down
2 changes: 1 addition & 1 deletion src/Jenssegers/Mongodb/Relations/MorphTo.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected function getResultsByType($type)

$query = $instance->newQuery();

return $query->whereIn($key, $this->gatherKeysByType($type))->get();
return $query->whereIn($key, $this->gatherKeysByType($type, $instance->getKeyType()))->get();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/QueueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function testQueueJobLifeCycle(): void
'job' => 'test',
'maxTries' => null,
'maxExceptions' => null,
'delay' => null,
'backoff' => null,
'timeout' => null,
'data' => ['action' => 'QueueJobLifeCycle'],
]), $job->getRawBody());
Expand Down