Skip to content

Commit 9516916

Browse files
committed
Update tooling
1 parent 7a827a6 commit 9516916

File tree

10 files changed

+17
-7
lines changed

10 files changed

+17
-7
lines changed

benchmarks/ASTUnserializationBench.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
use GraphQL\Language\Parser;
66
use Nuwave\Lighthouse\Schema\AST\DocumentAST;
77

8+
use function Safe\unserialize;
9+
810
/**
911
* @BeforeMethods({"prepareSchema"})
1012
*/

src/Auth/BaseCanDirective.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function handleField(FieldValue $fieldValue): void
108108
} catch (\Throwable $throwable) {
109109
$action = $this->directiveArgValue('action');
110110
if ($action === 'EXCEPTION_NOT_AUTHORIZED') {
111-
throw new AuthorizationException();
111+
throw new AuthorizationException($throwable->getMessage(), $throwable->getCode(), $throwable);
112112
}
113113

114114
if ($action === 'RETURN_VALUE') {

src/Execution/Arguments/Argument.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ class Argument
1414
*/
1515
public mixed $value;
1616

17-
/**
18-
* The type of the argument.
19-
*/
17+
/** The type of the argument. */
2018
public ListType|NamedType|null $type = null;
2119

2220
/**

src/Execution/ContextSerializer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
use Nuwave\Lighthouse\Support\Contracts\GraphQLContext;
1010
use Nuwave\Lighthouse\Support\Contracts\SerializesContext;
1111

12+
use function Safe\unserialize;
13+
1214
class ContextSerializer implements SerializesContext
1315
{
1416
use SerializesAndRestoresModelIdentifiers;

src/Scout/ScoutEnhancer.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ class ScoutEnhancer
4040

4141
public function __construct(
4242
protected ArgumentSet $argumentSet,
43-
/**
44-
* @var \Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<TModel>|\Illuminate\Database\Eloquent\Relations\Relation<TModel>|\Laravel\Scout\Builder $builder
45-
*/
43+
/** @var \Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<TModel>|\Illuminate\Database\Eloquent\Relations\Relation<TModel>|\Laravel\Scout\Builder $builder */
4644
protected QueryBuilder|EloquentBuilder|Relation|ScoutBuilder $builder,
4745
) {
4846
$this->gather($this->argumentSet);

src/Subscriptions/Storage/RedisStorageManager.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
use Nuwave\Lighthouse\Subscriptions\Contracts\StoresSubscriptions;
1111
use Nuwave\Lighthouse\Subscriptions\Subscriber;
1212

13+
use function Safe\unserialize;
14+
1315
/**
1416
* Stores subscribers and topics in redis.
1517
*

src/Subscriptions/Subscriber.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
use Nuwave\Lighthouse\Support\Contracts\GraphQLContext;
1212
use Nuwave\Lighthouse\Support\Contracts\SerializesContext;
1313

14+
use function Safe\unserialize;
15+
1416
class Subscriber
1517
{
1618
/**

tests/Integration/Async/AsyncDirectiveTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
use Nuwave\Lighthouse\Support\Contracts\GraphQLContext;
1111
use Tests\DBTestCase;
1212

13+
use function Safe\unserialize;
14+
1315
final class AsyncDirectiveTest extends DBTestCase
1416
{
1517
public function testDispatchesMutation(): void

tests/Unit/Schema/AST/DocumentASTTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
use Tests\TestCase;
1212
use Tests\Utils\Models\User;
1313

14+
use function Safe\unserialize;
15+
1416
final class DocumentASTTest extends TestCase
1517
{
1618
public function testParsesSimpleSchema(): void

tests/Unit/Subscriptions/SubscriberTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
use Tests\TestCase;
1313
use Tests\TestsSerialization;
1414

15+
use function Safe\unserialize;
16+
1517
final class SubscriberTest extends TestCase
1618
{
1719
use TestsSerialization;

0 commit comments

Comments
 (0)