Skip to content

Commit ac692ea

Browse files
Merge pull request #1 from jenssegers/master
chore: merge upstream
2 parents 6aa6ad1 + f4c448f commit ac692ea

40 files changed

+319
-57
lines changed

.github/workflows/build-ci.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
php-cs-fixer:
1111
runs-on: ubuntu-latest
1212
env:
13-
PHP_CS_FIXER_VERSION: v2.18.7
13+
PHP_CS_FIXER_VERSION: v3.6.0
1414
strategy:
1515
matrix:
1616
php:
17-
- '7.4'
17+
- '8.0'
1818
steps:
1919
- name: Checkout
2020
uses: actions/checkout@v2
@@ -35,19 +35,14 @@ jobs:
3535
strategy:
3636
matrix:
3737
include:
38-
- { os: ubuntu-latest, php: 7.2, mongodb: 3.6, experimental: true }
39-
- { os: ubuntu-latest, php: 7.2, mongodb: '4.0', experimental: true }
40-
- { os: ubuntu-latest, php: 7.2, mongodb: 4.2, experimental: true }
41-
- { os: ubuntu-latest, php: 7.2, mongodb: 4.4, experimental: true }
42-
- { os: ubuntu-latest, php: 7.3, mongodb: 3.6, experimental: false }
43-
- { os: ubuntu-latest, php: 7.3, mongodb: '4.0', experimental: false }
44-
- { os: ubuntu-latest, php: 7.3, mongodb: 4.2, experimental: false }
45-
- { os: ubuntu-latest, php: 7.3, mongodb: 4.4, experimental: false }
46-
- { os: ubuntu-latest, php: 7.4, mongodb: 3.6, experimental: false }
47-
- { os: ubuntu-latest, php: 7.4, mongodb: '4.0', experimental: false }
48-
- { os: ubuntu-latest, php: 7.4, mongodb: 4.2, experimental: false }
49-
- { os: ubuntu-latest, php: 7.4, mongodb: 4.4, experimental: false }
38+
- { os: ubuntu-latest, php: 8.0, mongodb: '4.0', experimental: false }
39+
- { os: ubuntu-latest, php: 8.0, mongodb: 4.2, experimental: false }
5040
- { os: ubuntu-latest, php: 8.0, mongodb: 4.4, experimental: false }
41+
- { os: ubuntu-latest, php: 8.0, mongodb: '5.0', experimental: false }
42+
- { os: ubuntu-latest, php: 8.1, mongodb: '4.0', experimental: false }
43+
- { os: ubuntu-latest, php: 8.1, mongodb: 4.2, experimental: false }
44+
- { os: ubuntu-latest, php: 8.1, mongodb: 4.4, experimental: false }
45+
- { os: ubuntu-latest, php: 8.1, mongodb: '5.0', experimental: false }
5146
services:
5247
mongo:
5348
image: mongo:${{ matrix.mongodb }}
@@ -78,22 +73,18 @@ jobs:
7873
env:
7974
DEBUG: ${{secrets.DEBUG}}
8075
- name: Download Composer cache dependencies from cache
81-
if: (!startsWith(matrix.php, '7.2'))
8276
id: composer-cache
8377
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
8478
- name: Cache Composer dependencies
85-
if: (!startsWith(matrix.php, '7.2'))
8679
uses: actions/cache@v1
8780
with:
8881
path: ${{ steps.composer-cache.outputs.dir }}
8982
key: ${{ matrix.os }}-composer-${{ hashFiles('**/composer.json') }}
9083
restore-keys: ${{ matrix.os }}-composer-
9184
- name: Install dependencies
92-
if: (!startsWith(matrix.php, '7.2'))
9385
run: |
9486
composer install --no-interaction
9587
- name: Run tests
96-
if: (!startsWith(matrix.php, '7.2'))
9788
run: |
9889
./vendor/bin/phpunit --coverage-clover coverage.xml
9990
env:

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
.DS_Store
55
.idea/
66
.phpunit.result.cache
7-
/.php_cs
8-
/.php_cs.cache
7+
/.php-cs-fixer.php
8+
/.php-cs-fixer.cache
99
/vendor
1010
composer.lock
1111
composer.phar

.php_cs.dist renamed to .php-cs-fixer.dist.php

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
],
2626
],
2727
'cast_spaces' => true,
28-
'class_definition' => true,
28+
'class_definition' => false,
2929
'clean_namespace' => true,
3030
'compact_nullable_typehint' => true,
3131
'concat_space' => [
@@ -46,16 +46,22 @@
4646
'heredoc_to_nowdoc' => true,
4747
'include' => true,
4848
'indentation_type' => true,
49+
'integer_literal_case' => true,
50+
'braces' => false,
4951
'lowercase_cast' => true,
50-
'lowercase_constants' => true,
52+
'constant_case' => [
53+
'case' => 'lower',
54+
],
5155
'lowercase_keywords' => true,
5256
'lowercase_static_reference' => true,
5357
'magic_constant_casing' => true,
5458
'magic_method_casing' => true,
55-
'method_argument_space' => true,
59+
'method_argument_space' => [
60+
'on_multiline' => 'ignore',
61+
],
5662
'class_attributes_separation' => [
5763
'elements' => [
58-
'method',
64+
'method' => 'one',
5965
],
6066
],
6167
'visibility_required' => [
@@ -74,7 +80,6 @@
7480
'tokens' => [
7581
'throw',
7682
'use',
77-
'use_trait',
7883
'extra',
7984
],
8085
],
@@ -87,6 +92,7 @@
8792
'multiline_whitespace_before_semicolons' => true,
8893
'no_short_bool_cast' => true,
8994
'no_singleline_whitespace_before_semicolons' => true,
95+
'no_space_around_double_colon' => true,
9096
'no_spaces_after_function_name' => true,
9197
'no_spaces_around_offset' => [
9298
'positions' => [
@@ -120,7 +126,9 @@
120126
'phpdoc_summary' => true,
121127
'phpdoc_trim' => true,
122128
'phpdoc_no_alias_tag' => [
123-
'type' => 'var',
129+
'replacements' => [
130+
'type' => 'var',
131+
],
124132
],
125133
'phpdoc_types' => true,
126134
'phpdoc_var_without_name' => true,
@@ -130,7 +138,6 @@
130138
'no_mixed_echo_print' => [
131139
'use' => 'echo',
132140
],
133-
'braces' => true,
134141
'return_type_declaration' => [
135142
'space_before' => 'none',
136143
],
@@ -153,22 +160,28 @@
153160
'switch_case_space' => true,
154161
'switch_continue_to_break' => true,
155162
'ternary_operator_spaces' => true,
156-
'trailing_comma_in_multiline_array' => true,
163+
'trailing_comma_in_multiline' => [
164+
'elements' => [
165+
'arrays',
166+
],
167+
],
157168
'trim_array_spaces' => true,
158169
'unary_operator_spaces' => true,
170+
'types_spaces' => [
171+
'space' => 'none',
172+
],
159173
'line_ending' => true,
160174
'whitespace_after_comma_in_array' => true,
161175
'no_alias_functions' => true,
162176
'no_unreachable_default_argument_value' => true,
163-
'psr4' => true,
177+
'psr_autoloading' => true,
164178
'self_accessor' => true,
165179
];
166180

167181
$finder = PhpCsFixer\Finder::create()
168182
->in(__DIR__);
169183

170-
$config = new PhpCsFixer\Config();
171-
return $config
184+
return (new PhpCsFixer\Config())
172185
->setRiskyAllowed(true)
173186
->setRules($rules)
174187
->setFinder($finder);

CHANGELOG.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,38 @@ All notable changes to this project will be documented in this file.
33

44
## [Unreleased]
55

6+
### Added
7+
- Backport support for cursor pagination [#2358](https://github.com/jenssegers/laravel-mongodb/pull/2358) by [@Jeroenwv](https://github.com/Jeroenwv).
8+
9+
## [3.9.0] - 2022-02-17
10+
11+
### Added
12+
- Compatibility with Laravel 9.x [#2344](https://github.com/jenssegers/laravel-mongodb/pull/2344) by [@divine](https://github.com/divine).
13+
14+
## [3.8.4] - 2021-05-27
15+
616
### Fixed
7-
- Sync passthru methods [#2194](https://github.com/jenssegers/laravel-mongodb/pull/2194) by [@simonschaufi](https://github.com/simonschaufi)
17+
- Fix getRelationQuery breaking changes [#2263](https://github.com/jenssegers/laravel-mongodb/pull/2263) by [@divine](https://github.com/divine).
18+
- Apply fixes produced by php-cs-fixer [#2250](https://github.com/jenssegers/laravel-mongodb/pull/2250) by [@divine](https://github.com/divine).
19+
20+
### Changed
21+
- Add doesntExist to passthru [#2194](https://github.com/jenssegers/laravel-mongodb/pull/2194) by [@simonschaufi](https://github.com/simonschaufi).
22+
- Add Model query whereDate support [#2251](https://github.com/jenssegers/laravel-mongodb/pull/2251) by [@yexk](https://github.com/yexk).
23+
- Add transaction free deleteAndRelease() method [#2229](https://github.com/jenssegers/laravel-mongodb/pull/2229) by [@sodoardi](https://github.com/sodoardi).
24+
- Add setDatabase to Jenssegers\Mongodb\Connection [#2236](https://github.com/jenssegers/laravel-mongodb/pull/2236) by [@ThomasWestrelin](https://github.com/ThomasWestrelin).
25+
- Check dates against DateTimeInterface instead of DateTime [#2239](https://github.com/jenssegers/laravel-mongodb/pull/2239) by [@jeromegamez](https://github.com/jeromegamez).
26+
- Move from psr-0 to psr-4 [#2247](https://github.com/jenssegers/laravel-mongodb/pull/2247) by [@divine](https://github.com/divine).
827

928
## [3.8.3] - 2021-02-21
1029

1130
### Changed
12-
- Fix query builder regression [#2204](https://github.com/jenssegers/laravel-mongodb/pull/2204) by [@divine](https://github.com/divine)
31+
- Fix query builder regression [#2204](https://github.com/jenssegers/laravel-mongodb/pull/2204) by [@divine](https://github.com/divine).
1332

1433
## [3.8.2] - 2020-12-18
1534

1635
### Changed
17-
- MongodbQueueServiceProvider does not use the DB Facade anymore [#2149](https://github.com/jenssegers/laravel-mongodb/pull/2149) by [@curosmj](https://github.com/curosmj)
18-
- Add escape regex chars to DB Presence Verifier [#1992](https://github.com/jenssegers/laravel-mongodb/pull/1992) by [@andrei-gafton-rtgt](https://github.com/andrei-gafton-rtgt)
36+
- MongodbQueueServiceProvider does not use the DB Facade anymore [#2149](https://github.com/jenssegers/laravel-mongodb/pull/2149) by [@curosmj](https://github.com/curosmj).
37+
- Add escape regex chars to DB Presence Verifier [#1992](https://github.com/jenssegers/laravel-mongodb/pull/1992) by [@andrei-gafton-rtgt](https://github.com/andrei-gafton-rtgt).
1938

2039
## [3.8.1] - 2020-10-23
2140

@@ -28,4 +47,4 @@ All notable changes to this project will be documented in this file.
2847
## [3.8.0] - 2020-09-03
2948

3049
### Added
31-
- Laravel 8 support & updated versions of all dependencies [#2108](https://github.com/jenssegers/laravel-mongodb/pull/2108) by [@divine](https://github.com/divine).
50+
- Laravel 8 support & updated versions of all dependencies [#2108](https://github.com/jenssegers/laravel-mongodb/pull/2108) by [@divine](https://github.com/divine).

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG PHP_VERSION=7.4
1+
ARG PHP_VERSION=8.0
22
ARG COMPOSER_VERSION=2.0
33

44
FROM composer:${COMPOSER_VERSION}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Make sure you have the MongoDB PHP driver installed. You can find installation i
5858

5959
Laravel | Package | Maintained
6060
:---------|:---------------|:----------
61+
9.x | 3.9.x | :white_check_mark:
6162
8.x | 3.8.x | :white_check_mark:
6263
7.x | 3.7.x | :x:
6364
6.x | 3.6.x | :white_check_mark:

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@
1919
],
2020
"license": "MIT",
2121
"require": {
22-
"illuminate/support": "^8.0",
23-
"illuminate/container": "^8.0",
24-
"illuminate/database": "^8.0",
25-
"illuminate/events": "^8.0",
26-
"mongodb/mongodb": "^1.6"
22+
"illuminate/support": "^9.0",
23+
"illuminate/container": "^9.0",
24+
"illuminate/database": "^9.0",
25+
"illuminate/events": "^9.0",
26+
"mongodb/mongodb": "^1.11"
2727
},
2828
"require-dev": {
29-
"phpunit/phpunit": "^9.0",
30-
"orchestra/testbench": "^6.0",
29+
"phpunit/phpunit": "^9.5.8",
30+
"orchestra/testbench": "^7.0",
3131
"mockery/mockery": "^1.3.1",
32-
"doctrine/dbal": "^2.6"
32+
"doctrine/dbal": "^2.13.3|^3.1.4"
3333
},
3434
"autoload": {
3535
"psr-4": {

src/Auth/PasswordResetServiceProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ class PasswordResetServiceProvider extends BasePasswordResetServiceProvider
88
{
99
/**
1010
* Register the token repository implementation.
11+
*
1112
* @return void
1213
*/
1314
protected function registerTokenRepository()

src/Collection.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ class Collection
1010
{
1111
/**
1212
* The connection instance.
13+
*
1314
* @var Connection
1415
*/
1516
protected $connection;
1617

1718
/**
18-
* The MongoCollection instance..
19+
* The MongoCollection instance.
20+
*
1921
* @var MongoCollection
2022
*/
2123
protected $collection;
@@ -32,6 +34,7 @@ public function __construct(Connection $connection, MongoCollection $collection)
3234

3335
/**
3436
* Handle dynamic method calls.
37+
*
3538
* @param string $method
3639
* @param array $parameters
3740
* @return mixed

0 commit comments

Comments
 (0)