File tree Expand file tree Collapse file tree 7 files changed +10
-14
lines changed
Expand file tree Collapse file tree 7 files changed +10
-14
lines changed Original file line number Diff line number Diff line change 55use GraphQL \Language \Parser ;
66use Nuwave \Lighthouse \Schema \AST \DocumentAST ;
77
8- use function Safe \unserialize ;
9-
108/**
119 * @BeforeMethods({"prepareSchema"})
1210 */
@@ -54,6 +52,7 @@ public function prepareSchema(): void
5452 */
5553 public function benchUnserializeDocumentNode (): void
5654 {
55+ // @phpstan-ignore theCodingMachineSafe.function (Safe\unserialize is not available in thecodingmachine/safe ^1 and ^2)
5756 unserialize ($ this ->documentNode );
5857 }
5958
@@ -64,6 +63,7 @@ public function benchUnserializeDocumentNode(): void
6463 */
6564 public function benchUnserializeDocumentAST (): void
6665 {
66+ // @phpstan-ignore theCodingMachineSafe.function (Safe\unserialize is not available in thecodingmachine/safe ^1 and ^2)
6767 unserialize ($ this ->documentAST );
6868 }
6969}
Original file line number Diff line number Diff line change 99use Nuwave \Lighthouse \Support \Contracts \GraphQLContext ;
1010use Nuwave \Lighthouse \Support \Contracts \SerializesContext ;
1111
12- use function Safe \unserialize ;
13-
1412class ContextSerializer implements SerializesContext
1513{
1614 use SerializesAndRestoresModelIdentifiers;
@@ -44,6 +42,7 @@ public function unserialize(string $context): GraphQLContext
4442 [
4543 'request ' => $ rawRequest ,
4644 'user ' => $ rawUser
45+ // @phpstan-ignore theCodingMachineSafe.function (Safe\unserialize is not available in thecodingmachine/safe ^1 and ^2)
4746 ] = unserialize ($ context );
4847
4948 if ($ rawRequest ) {
Original file line number Diff line number Diff line change 1010use Nuwave \Lighthouse \Subscriptions \Contracts \StoresSubscriptions ;
1111use Nuwave \Lighthouse \Subscriptions \Subscriber ;
1212
13- use function Safe \unserialize ;
14-
1513/**
1614 * Stores subscribers and topics in redis.
1715 *
@@ -89,6 +87,7 @@ public function subscribersByTopic(string $topic): Collection
8987
9088 // Other entries may contain invalid values.
9189 try {
90+ // @phpstan-ignore theCodingMachineSafe.function (Safe\unserialize is not available in thecodingmachine/safe ^1 and ^2)
9291 $ subscriber = unserialize ($ subscriber );
9392
9493 // This key exists so remove it from the list of missing keys.
@@ -166,6 +165,7 @@ protected function getSubscriber(string $channelKey): ?Subscriber
166165 $ subscriber = $ this ->connection ->command ('get ' , [$ channelKey ]);
167166
168167 return is_string ($ subscriber )
168+ // @phpstan-ignore theCodingMachineSafe.function (Safe\unserialize is not available in thecodingmachine/safe ^1 and ^2)
169169 ? unserialize ($ subscriber )
170170 : null ;
171171 }
Original file line number Diff line number Diff line change 1111use Nuwave \Lighthouse \Support \Contracts \GraphQLContext ;
1212use Nuwave \Lighthouse \Support \Contracts \SerializesContext ;
1313
14- use function Safe \unserialize ;
15-
1614class Subscriber
1715{
1816 /**
@@ -105,6 +103,7 @@ public function __unserialize(array $data): void
105103 $ this ->topic = $ data ['topic ' ];
106104
107105 $ documentNode = AST ::fromArray (
106+ // @phpstan-ignore theCodingMachineSafe.function (Safe\unserialize is not available in thecodingmachine/safe ^1 and ^2)
108107 unserialize ($ data ['query ' ]),
109108 );
110109 assert ($ documentNode instanceof DocumentNode, 'We know the type since it is set during construction and serialized. ' );
Original file line number Diff line number Diff line change 1010use Nuwave \Lighthouse \Support \Contracts \GraphQLContext ;
1111use Tests \DBTestCase ;
1212
13- use function Safe \unserialize ;
14-
1513final class AsyncDirectiveTest extends DBTestCase
1614{
1715 public function testDispatchesMutation (): void
@@ -40,6 +38,7 @@ public function testDispatchesMutation(): void
4038 foreach ($ jobs as $ job ) {
4139 $ this ->assertInstanceOf (AsyncMutation::class, $ job );
4240
41+ // @phpstan-ignore theCodingMachineSafe.function (Safe\unserialize is not available in thecodingmachine/safe ^1 and ^2)
4342 $ jobCycledThroughSerialization = unserialize (serialize ($ job ));
4443 $ this ->assertInstanceOf (AsyncMutation::class, $ jobCycledThroughSerialization );
4544 Container::getInstance ()->call ([$ jobCycledThroughSerialization , 'handle ' ]);
@@ -73,6 +72,7 @@ public function testDispatchesMutationOnCustomQueue(): void
7372 $ this ->assertInstanceOf (AsyncMutation::class, $ job );
7473 $ this ->assertSame ('custom ' , $ job ->queue );
7574
75+ // @phpstan-ignore theCodingMachineSafe.function (Safe\unserialize is not available in thecodingmachine/safe ^1 and ^2)
7676 $ jobCycledThroughSerialization = unserialize (serialize ($ job ));
7777 $ this ->assertInstanceOf (AsyncMutation::class, $ jobCycledThroughSerialization );
7878 Container::getInstance ()->call ([$ jobCycledThroughSerialization , 'handle ' ]);
Original file line number Diff line number Diff line change 1111use Tests \TestCase ;
1212use Tests \Utils \Models \User ;
1313
14- use function Safe \unserialize ;
15-
1614final class DocumentASTTest extends TestCase
1715{
1816 public function testParsesSimpleSchema (): void
@@ -100,6 +98,7 @@ public function testBeSerialized(): void
10098 directive @foo on FIELD
10199 GRAPHQL);
102100
101+ // @phpstan-ignore theCodingMachineSafe.function (Safe\unserialize is not available in thecodingmachine/safe ^1 and ^2)
103102 $ reserialized = unserialize (
104103 serialize ($ documentAST ),
105104 );
Original file line number Diff line number Diff line change 1212use Tests \TestCase ;
1313use Tests \TestsSerialization ;
1414
15- use function Safe \unserialize ;
16-
1715final class SubscriberTest extends TestCase
1816{
1917 use TestsSerialization;
@@ -47,6 +45,7 @@ public function testSerializable(): void
4745
4846 $ channel = $ subscriber ->channel ;
4947
48+ // @phpstan-ignore theCodingMachineSafe.function (Safe\unserialize is not available in thecodingmachine/safe ^1 and ^2)
5049 $ serialized = unserialize (serialize ($ subscriber ));
5150
5251 $ this ->assertInstanceOf (Subscriber::class, $ serialized );
You can’t perform that action at this time.
0 commit comments