Skip to content

Commit 1a5faa3

Browse files
authored
Merge pull request #984 from rebing/laravel-10
2 parents fc0d1d5 + 846cc20 commit 1a5faa3

File tree

7 files changed

+41
-19
lines changed

7 files changed

+41
-19
lines changed

.github/workflows/integration_tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
fail-fast: false
3535
matrix:
3636
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
37-
laravel: [^6.0, ^8.0, ^9.0]
37+
laravel: [^6.0, ^8.0, ^9.0, ^10.0]
3838
exclude:
3939
- php: 7.4
4040
laravel: ^9.0
@@ -44,6 +44,10 @@ jobs:
4444
laravel: ^6.0
4545
- php: 8.2
4646
laravel: ^6.0
47+
- php: 8.0
48+
laravel: ^10.0
49+
- php: 7.4
50+
laravel: ^10.0
4751
name: P=${{ matrix.php }} L=${{ matrix.laravel }}
4852
runs-on: ubuntu-latest
4953
env:

.github/workflows/tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
fail-fast: false
3535
matrix:
3636
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
37-
laravel: [^6.0, ^8.0, ^9.0]
37+
laravel: [^6.0, ^8.0, ^9.0, ^10.0]
3838
lazy_types: ['false', 'true']
3939
exclude:
4040
- php: 7.4
@@ -45,6 +45,10 @@ jobs:
4545
laravel: ^6.0
4646
- php: 8.2
4747
laravel: ^6.0
48+
- php: 8.0
49+
laravel: ^10.0
50+
- php: 7.4
51+
laravel: ^10.0
4852
name: P=${{ matrix.php }} L=${{ matrix.laravel }} Lazy types=${{ matrix.lazy_types }}
4953
runs-on: ubuntu-latest
5054
env:

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
CHANGELOG
22
=========
33

4-
[Next release](https://github.com/rebing/graphql-laravel/compare/8.5.0...master)
4+
[Next release](https://github.com/rebing/graphql-laravel/compare/8.6.0...master)
55
--------------
66

7+
2023-02-18, 8.6.0
8+
-----------------
9+
### Added
10+
- Add Laravl 10 support [\#983 / jasonvarga](https://github.com/rebing/graphql-laravel/pull/983)
11+
712
2023-01-13, 8.5.0
813
-----------------
914
### Added

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
"require": {
3737
"php": ">= 7.4",
3838
"ext-json": "*",
39-
"illuminate/contracts": "^6.0|^8.0|^9.0",
40-
"illuminate/support": "^6.0|^8.0|^9.0",
39+
"illuminate/contracts": "^6.0|^8.0|^9.0|^10.0",
40+
"illuminate/support": "^6.0|^8.0|^9.0|^10.0",
4141
"laragraph/utils": "^1",
4242
"thecodingmachine/safe": "^1.1|^2.4",
4343
"webonyx/graphql-php": "^14.6.4"
@@ -48,9 +48,9 @@
4848
"laravel/legacy-factories": "^1.0",
4949
"mfn/php-cs-fixer-config": "^2",
5050
"mockery/mockery": "^1.2",
51-
"nunomaduro/larastan": "1.0.3",
52-
"orchestra/testbench": "4.0.*|5.0.*|^6.0|^7.0",
5351
"phpstan/phpstan": "1.8.4",
52+
"nunomaduro/larastan": "1.0.3",
53+
"orchestra/testbench": "4.0.*|5.0.*|^6.0|^7.0|^8.0",
5454
"phpunit/phpunit": "~7.0|~8.0|^9",
5555
"thecodingmachine/phpstan-safe-rule": "^1"
5656
},
@@ -77,7 +77,7 @@
7777
},
7878
"extra": {
7979
"branch-alias": {
80-
"dev-master": "8.5-dev"
80+
"dev-master": "8.6-dev"
8181
},
8282
"laravel": {
8383
"providers": [

tests/Unit/Input/UserInputTest.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ public function testWildcardInputValidationOneInput(): void
3636
'extensions' => [
3737
'category' => 'validation',
3838
'validation' => [
39-
'data.0.password' => [
40-
'The data.0.password and data.*.password confirmation must match.',
41-
],
39+
'data.0.password' => [
40+
// The data.0.password and data.*.password confirmation must match.
41+
trans('validation.same', ['attribute' => 'data.0.password', 'other' => 'data.*.password confirmation']),
42+
],
4243
],
4344
],
4445
'locations' => [
@@ -90,10 +91,12 @@ public function testWildcardInputValidationTwoInputs(): void
9091
'category' => 'validation',
9192
'validation' => [
9293
'data.0.password' => [
93-
'The data.0.password and data.*.password confirmation must match.',
94+
// The data.0.password and data.*.password confirmation must match.
95+
trans('validation.same', ['attribute' => 'data.0.password', 'other' => 'data.*.password confirmation']),
9496
],
9597
'data.1.password' => [
96-
'The data.1.password and data.*.password confirmation must match.',
98+
// The data.1.password and data.*.password confirmation must match.
99+
trans('validation.same', ['attribute' => 'data.1.password', 'other' => 'data.*.password confirmation']),
97100
],
98101
],
99102
],

tests/Unit/MutationTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,11 +356,13 @@ public function testCustomValidationErrorMessages(): void
356356

357357
self::assertEquals('The test field is required.', $messages->first('test'));
358358
self::assertEquals(
359-
'The test with rules nullable input object.nest.email must be a valid email address.',
359+
// The test with rules nullable input object.nest.email must be a valid email address.
360+
trans('validation.email', ['attribute' => 'test with rules nullable input object.nest.email']),
360361
$messages->first('test_with_rules_nullable_input_object.nest.email')
361362
);
362363
self::assertEquals(
363-
'The test with rules non nullable input object.nest.email must be a valid email address.',
364+
// The test with rules non nullable input object.nest.email must be a valid email address.
365+
trans('validation.email', ['attribute' => 'test with rules non nullable input object.nest.email']),
364366
$messages->first('test_with_rules_non_nullable_input_object.nest.email')
365367
);
366368
}

tests/Unit/ValidationOfFieldArguments/ValidationOfFieldArgumentsTest.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,16 @@ public function testRulesTakesEffect(): void
5454
'category' => 'validation',
5555
'validation' => [
5656
'profile.fields.name.args.includeMiddleNames' => [
57-
'The profile.fields.name.args.include middle names format is invalid.',
57+
// The profile.fields.name.args.include middle names format is invalid.',
58+
trans('validation.regex', ['attribute' => 'profile.fields.name.args.include middle names']),
5859
],
5960
'profile.fields.height.args.unit' => [
60-
'The profile.fields.height.args.unit format is invalid.',
61+
// 'The profile.fields.height.args.unit format is invalid.
62+
trans('validation.regex', ['attribute' => 'profile.fields.height.args.unit']),
6163
],
6264
'profile.args.profileId' => [
63-
'The profile.args.profile id must not be greater than 10.',
65+
// The profile.args.profile id must not be greater than 10.
66+
trans('validation.max.numeric', ['attribute' => 'profile.args.profile id', 'max' => 10]),
6467
],
6568
],
6669
],
@@ -113,7 +116,8 @@ public function testOnlyApplicableRulesTakesEffect(): void
113116
'category' => 'validation',
114117
'validation' => [
115118
'alias.args.type' => [
116-
'The alias.args.type format is invalid.',
119+
// The alias.args.type format is invalid.
120+
trans('validation.regex', ['attribute' => 'alias.args.type']),
117121
],
118122
],
119123
],

0 commit comments

Comments
 (0)