Skip to content

Commit

Permalink
Merge pull request #984 from rebing/laravel-10
Browse files Browse the repository at this point in the history
  • Loading branch information
mfn authored Feb 18, 2023
2 parents fc0d1d5 + 846cc20 commit 1a5faa3
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 19 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
fail-fast: false
matrix:
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
laravel: [^6.0, ^8.0, ^9.0]
laravel: [^6.0, ^8.0, ^9.0, ^10.0]
exclude:
- php: 7.4
laravel: ^9.0
Expand All @@ -44,6 +44,10 @@ jobs:
laravel: ^6.0
- php: 8.2
laravel: ^6.0
- php: 8.0
laravel: ^10.0
- php: 7.4
laravel: ^10.0
name: P=${{ matrix.php }} L=${{ matrix.laravel }}
runs-on: ubuntu-latest
env:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
fail-fast: false
matrix:
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
laravel: [^6.0, ^8.0, ^9.0]
laravel: [^6.0, ^8.0, ^9.0, ^10.0]
lazy_types: ['false', 'true']
exclude:
- php: 7.4
Expand All @@ -45,6 +45,10 @@ jobs:
laravel: ^6.0
- php: 8.2
laravel: ^6.0
- php: 8.0
laravel: ^10.0
- php: 7.4
laravel: ^10.0
name: P=${{ matrix.php }} L=${{ matrix.laravel }} Lazy types=${{ matrix.lazy_types }}
runs-on: ubuntu-latest
env:
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
CHANGELOG
=========

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

2023-02-18, 8.6.0
-----------------
### Added
- Add Laravl 10 support [\#983 / jasonvarga](https://github.com/rebing/graphql-laravel/pull/983)

2023-01-13, 8.5.0
-----------------
### Added
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
"require": {
"php": ">= 7.4",
"ext-json": "*",
"illuminate/contracts": "^6.0|^8.0|^9.0",
"illuminate/support": "^6.0|^8.0|^9.0",
"illuminate/contracts": "^6.0|^8.0|^9.0|^10.0",
"illuminate/support": "^6.0|^8.0|^9.0|^10.0",
"laragraph/utils": "^1",
"thecodingmachine/safe": "^1.1|^2.4",
"webonyx/graphql-php": "^14.6.4"
Expand All @@ -48,9 +48,9 @@
"laravel/legacy-factories": "^1.0",
"mfn/php-cs-fixer-config": "^2",
"mockery/mockery": "^1.2",
"nunomaduro/larastan": "1.0.3",
"orchestra/testbench": "4.0.*|5.0.*|^6.0|^7.0",
"phpstan/phpstan": "1.8.4",
"nunomaduro/larastan": "1.0.3",
"orchestra/testbench": "4.0.*|5.0.*|^6.0|^7.0|^8.0",
"phpunit/phpunit": "~7.0|~8.0|^9",
"thecodingmachine/phpstan-safe-rule": "^1"
},
Expand All @@ -77,7 +77,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "8.5-dev"
"dev-master": "8.6-dev"
},
"laravel": {
"providers": [
Expand Down
13 changes: 8 additions & 5 deletions tests/Unit/Input/UserInputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ public function testWildcardInputValidationOneInput(): void
'extensions' => [
'category' => 'validation',
'validation' => [
'data.0.password' => [
'The data.0.password and data.*.password confirmation must match.',
],
'data.0.password' => [
// The data.0.password and data.*.password confirmation must match.
trans('validation.same', ['attribute' => 'data.0.password', 'other' => 'data.*.password confirmation']),
],
],
],
'locations' => [
Expand Down Expand Up @@ -90,10 +91,12 @@ public function testWildcardInputValidationTwoInputs(): void
'category' => 'validation',
'validation' => [
'data.0.password' => [
'The data.0.password and data.*.password confirmation must match.',
// The data.0.password and data.*.password confirmation must match.
trans('validation.same', ['attribute' => 'data.0.password', 'other' => 'data.*.password confirmation']),
],
'data.1.password' => [
'The data.1.password and data.*.password confirmation must match.',
// The data.1.password and data.*.password confirmation must match.
trans('validation.same', ['attribute' => 'data.1.password', 'other' => 'data.*.password confirmation']),
],
],
],
Expand Down
6 changes: 4 additions & 2 deletions tests/Unit/MutationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,13 @@ public function testCustomValidationErrorMessages(): void

self::assertEquals('The test field is required.', $messages->first('test'));
self::assertEquals(
'The test with rules nullable input object.nest.email must be a valid email address.',
// The test with rules nullable input object.nest.email must be a valid email address.
trans('validation.email', ['attribute' => 'test with rules nullable input object.nest.email']),
$messages->first('test_with_rules_nullable_input_object.nest.email')
);
self::assertEquals(
'The test with rules non nullable input object.nest.email must be a valid email address.',
// The test with rules non nullable input object.nest.email must be a valid email address.
trans('validation.email', ['attribute' => 'test with rules non nullable input object.nest.email']),
$messages->first('test_with_rules_non_nullable_input_object.nest.email')
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,16 @@ public function testRulesTakesEffect(): void
'category' => 'validation',
'validation' => [
'profile.fields.name.args.includeMiddleNames' => [
'The profile.fields.name.args.include middle names format is invalid.',
// The profile.fields.name.args.include middle names format is invalid.',
trans('validation.regex', ['attribute' => 'profile.fields.name.args.include middle names']),
],
'profile.fields.height.args.unit' => [
'The profile.fields.height.args.unit format is invalid.',
// 'The profile.fields.height.args.unit format is invalid.
trans('validation.regex', ['attribute' => 'profile.fields.height.args.unit']),
],
'profile.args.profileId' => [
'The profile.args.profile id must not be greater than 10.',
// The profile.args.profile id must not be greater than 10.
trans('validation.max.numeric', ['attribute' => 'profile.args.profile id', 'max' => 10]),
],
],
],
Expand Down Expand Up @@ -113,7 +116,8 @@ public function testOnlyApplicableRulesTakesEffect(): void
'category' => 'validation',
'validation' => [
'alias.args.type' => [
'The alias.args.type format is invalid.',
// The alias.args.type format is invalid.
trans('validation.regex', ['attribute' => 'alias.args.type']),
],
],
],
Expand Down

0 comments on commit 1a5faa3

Please sign in to comment.