Skip to content

Commit 4909d77

Browse files
committed
Restore PR #2314 files to d5c128a state after merging master
1 parent 0630f70 commit 4909d77

3 files changed

Lines changed: 47 additions & 49 deletions

File tree

composer.json

Lines changed: 30 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -29,51 +29,46 @@
2929
"php": "^8",
3030
"ext-json": "*",
3131
"haydenpierce/class-finder": "^0.4 || ^0.5",
32-
"illuminate/auth": "^9 || ^10 || ^11 || ^12",
33-
"illuminate/bus": "^9 || ^10 || ^11 || ^12",
34-
"illuminate/contracts": "^9 || ^10 || ^11 || ^12",
35-
"illuminate/http": "^9 || ^10 || ^11 || ^12",
36-
"illuminate/pagination": "^9 || ^10 || ^11 || ^12",
37-
"illuminate/queue": "^9 || ^10 || ^11 || ^12",
38-
"illuminate/routing": "^9 || ^10 || ^11 || ^12",
39-
"illuminate/support": "^9 || ^10 || ^11 || ^12",
40-
"illuminate/validation": "^9 || ^10 || ^11 || ^12",
41-
"laragraph/utils": "^1.5 || ^2",
42-
"thecodingmachine/safe": "^1 || ^2 || ^3",
32+
"illuminate/auth": "^9 || ^10",
33+
"illuminate/bus": "^9 || ^10",
34+
"illuminate/contracts": "^9 || ^10",
35+
"illuminate/http": "^9 || ^10",
36+
"illuminate/pagination": "^9 || ^10",
37+
"illuminate/queue": "^9 || ^10",
38+
"illuminate/routing": "^9 || ^10",
39+
"illuminate/support": "^9 || ^10",
40+
"illuminate/validation": "^9 || ^10",
41+
"laragraph/utils": "^1.5",
42+
"thecodingmachine/safe": "^1 || ^2",
4343
"webonyx/graphql-php": "dev-nodelist-array-access as 15.1.1"
4444
},
4545
"require-dev": {
46-
"algolia/algoliasearch-client-php": "^3",
46+
"algolia/algoliasearch-client-php": "^3 || ^4",
4747
"bensampo/laravel-enum": "^5 || ^6",
48+
"dms/phpunit-arraysubset-asserts": "^0.4",
4849
"ergebnis/composer-normalize": "^2.2.2",
49-
"fakerphp/faker": "^1.21",
50-
"google/protobuf": "^3.21",
51-
"larastan/larastan": "^2.9.14 || ^3.0.4",
52-
"laravel/framework": "^9 || ^10 || ^11 || ^12",
50+
"laravel/framework": "^9 || ^10",
5351
"laravel/legacy-factories": "^1.1.1",
54-
"laravel/pennant": "^1",
52+
"laravel/lumen-framework": "^9 || ^10 || dev-master",
5553
"laravel/scout": "^8 || ^9 || ^10",
56-
"mattiasgeniar/phpunit-query-count-assertions": "^1.1",
57-
"mll-lab/graphql-php-scalars": "^6.4.1",
54+
"mll-lab/graphql-php-scalars": "^6",
5855
"mll-lab/php-cs-fixer-config": "^5",
5956
"mockery/mockery": "^1.5",
60-
"nesbot/carbon": "^2.62.1 || ^3.8.4",
61-
"orchestra/testbench": "^7.50 || ^8.32 || ^9.10 || ^10.1",
57+
"nesbot/carbon": "^2.62.1",
58+
"nunomaduro/larastan": "^2",
59+
"orchestra/testbench": "^7.7 || ^8.8",
6260
"phpbench/phpbench": "^1.2.6",
63-
"phpstan/extension-installer": "^1",
64-
"phpstan/phpstan": "^1.12.18 || ^2",
65-
"phpstan/phpstan-mockery": "^1.1.3 || ^2",
66-
"phpstan/phpstan-phpunit": "^1.1.1 || ^2",
67-
"phpunit/phpunit": "^9.6.4 || ^10 || ^11 || ^12",
61+
"phpstan/phpstan": "^1.8.4",
62+
"phpstan/phpstan-mockery": "~0.12 || ^1.1",
63+
"phpstan/phpstan-phpunit": "~0.12 || ^1.1.1",
64+
"phpunit/phpunit": "^9.5.24",
6865
"predis/predis": "^1.1 || ^2.1",
6966
"pusher/pusher-php-server": "^5 || ^6 || ^7.0.2",
70-
"rector/rector": "^1 || ^2",
67+
"rector/rector": "^0.12.23",
7168
"thecodingmachine/phpstan-safe-rule": "^1.2"
7269
},
7370
"suggest": {
74-
"ext-protobuf": "Improve protobuf serialization performance (used for tracing)",
75-
"google/protobuf": "Required when using the tracing driver federated-tracing",
76-
"laravel/pennant": "Required for the @feature directive",
71+
"bensampo/laravel-enum": "Convenient enum definitions that can easily be registered in your Schema",
7772
"laravel/scout": "Required for the @search directive",
7873
"mll-lab/graphql-php-scalars": "Useful scalar types, required for @whereConditions",
7974
"mll-lab/laravel-graphiql": "A graphical interactive in-browser GraphQL IDE - integrated with Laravel",
@@ -96,22 +91,23 @@
9691
"allow-plugins": {
9792
"composer/package-versions-deprecated": true,
9893
"ergebnis/composer-normalize": true,
99-
"kylekatarnls/update-helper": true,
100-
"phpstan/extension-installer": true
94+
"kylekatarnls/update-helper": true
10195
},
10296
"sort-packages": true
10397
},
10498
"extra": {
10599
"laravel": {
100+
"aliases": {
101+
"graphql": "Nuwave\\Lighthouse\\GraphQL"
102+
},
106103
"providers": [
107104
"Nuwave\\Lighthouse\\LighthouseServiceProvider",
108-
"Nuwave\\Lighthouse\\Async\\AsyncServiceProvider",
109105
"Nuwave\\Lighthouse\\Auth\\AuthServiceProvider",
110-
"Nuwave\\Lighthouse\\Bind\\BindServiceProvider",
111106
"Nuwave\\Lighthouse\\Cache\\CacheServiceProvider",
112107
"Nuwave\\Lighthouse\\GlobalId\\GlobalIdServiceProvider",
113108
"Nuwave\\Lighthouse\\OrderBy\\OrderByServiceProvider",
114109
"Nuwave\\Lighthouse\\Pagination\\PaginationServiceProvider",
110+
"Nuwave\\Lighthouse\\Scout\\ScoutServiceProvider",
115111
"Nuwave\\Lighthouse\\SoftDeletes\\SoftDeletesServiceProvider",
116112
"Nuwave\\Lighthouse\\Testing\\TestingServiceProvider",
117113
"Nuwave\\Lighthouse\\Validation\\ValidationServiceProvider"

tests/Unit/Schema/Directives/BaseDirectiveTest.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php declare(strict_types=1);
1+
<?php
22

33
namespace Tests\Unit\Schema\Directives;
44

@@ -35,7 +35,7 @@ public function testGetsModelClassFromDirective(): void
3535

3636
$this->assertSame(
3737
Team::class,
38-
$directive->getModelClass(),
38+
$directive->getModelClass()
3939
);
4040
}
4141

@@ -51,7 +51,7 @@ public function testDefaultsToFieldTypeForTheModelClass(): void
5151

5252
$this->assertSame(
5353
User::class,
54-
$directive->getModelClass(),
54+
$directive->getModelClass()
5555
);
5656
}
5757

@@ -69,7 +69,7 @@ public function testBuiltInTypeTolerated(): void
6969

7070
$this->assertSame(
7171
Team::class,
72-
$directive->getModelClass(),
72+
$directive->getModelClass()
7373
);
7474
}
7575

@@ -99,7 +99,7 @@ public function testResolvesAModelThatIsNamedLikeABaseClass(): void
9999

100100
$this->assertSame(
101101
Closure::class,
102-
$directive->getModelClass(),
102+
$directive->getModelClass()
103103
);
104104
}
105105

@@ -115,7 +115,7 @@ public function testPrefersThePrimaryModelNamespace(): void
115115

116116
$this->assertSame(
117117
Category::class,
118-
$directive->getModelClass(),
118+
$directive->getModelClass()
119119
);
120120
}
121121

@@ -131,7 +131,7 @@ public function testAllowsOverwritingTheDefaultModel(): void
131131

132132
$this->assertSame(
133133
CategorySecondary::class,
134-
$directive->getModelClass(),
134+
$directive->getModelClass()
135135
);
136136
}
137137

@@ -147,7 +147,7 @@ public function testResolvesFromTheSecondaryModelNamespace(): void
147147

148148
$this->assertSame(
149149
OnlyHere::class,
150-
$directive->getModelClass(),
150+
$directive->getModelClass()
151151
);
152152
}
153153

@@ -158,13 +158,13 @@ public function testGetsArgumentFromDirective(): void
158158
$this->assertSame(
159159
'argValue',
160160
// @phpstan-ignore-next-line protected method is called via wrapper below
161-
$directive->directiveArgValue('argName'),
161+
$directive->directiveArgValue('argName')
162162
);
163163

164164
$this->assertSame(
165165
'argValue2',
166166
// @phpstan-ignore-next-line protected method is called via wrapper below
167-
$directive->directiveArgValue('argName2'),
167+
$directive->directiveArgValue('argName2')
168168
);
169169
}
170170

@@ -182,7 +182,7 @@ public function testMutuallyExclusive(): void
182182
$directive = $this->constructFieldDirective('foo: ID @dummy(bar: 1, baz: 2)');
183183

184184
$this->expectExceptionObject(
185-
new DefinitionException('The arguments [bar, baz, qux] for @base are mutually exclusive, found [bar, baz] on foo.'),
185+
new DefinitionException('The arguments [bar, baz, qux] for @base are mutually exclusive, found [bar, baz] on foo.')
186186
);
187187
// @phpstan-ignore-next-line protected method is called via wrapper below
188188
$directive->validateMutuallyExclusiveArguments(['bar', 'baz', 'qux']);
@@ -213,7 +213,7 @@ public function __call(string $method, array $args)
213213

214214
$directive->hydrate(
215215
$fieldDefinition->directives->get(0),
216-
$fieldDefinition,
216+
$fieldDefinition
217217
);
218218

219219
return $directive;

tests/Unit/Schema/ResolverProviderTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php declare(strict_types=1);
1+
<?php
22

33
namespace Tests\Unit\Schema;
44

@@ -12,7 +12,9 @@
1212

1313
final class ResolverProviderTest extends TestCase
1414
{
15-
/** @var \Nuwave\Lighthouse\Schema\ResolverProvider */
15+
/**
16+
* @var \Nuwave\Lighthouse\Schema\ResolverProvider
17+
*/
1618
protected $resolverProvider;
1719

1820
public function setUp(): void
@@ -66,7 +68,7 @@ protected function constructFieldValue(string $fieldDefinition, string $parentTy
6668

6769
return new FieldValue(
6870
$typeValue,
69-
$queryType->fields->get(0),
71+
$queryType->fields->get(0)
7072
);
7173
}
7274
}

0 commit comments

Comments
 (0)