77use Illuminate \Support \Facades \Queue ;
88use Tests \Fixtures \V2 \TestGreetingWorkflow ;
99use Tests \TestCase ;
10+ use Workflow \Serializers \CodecRegistry ;
1011use Workflow \Serializers \Serializer ;
1112use Workflow \V2 \Enums \ActivityStatus ;
1213use Workflow \V2 \Enums \RunStatus ;
@@ -191,7 +192,7 @@ public function testControlPlaneStartCreatesWorkflow(): void
191192 $ response = $ this ->postJson ('/webhooks/control-plane/start ' , [
192193 'workflow_type ' => 'test-greeting-workflow ' ,
193194 'instance_id ' => 'cp-start-1 ' ,
194- 'arguments ' => Serializer::serialize ( ['Taylor ' ]),
195+ 'arguments ' => Serializer::serializeWithCodec (CodecRegistry:: defaultCodec (), ['Taylor ' ]),
195196 'connection ' => 'redis ' ,
196197 'queue ' => 'default ' ,
197198 ]);
@@ -210,13 +211,13 @@ public function testControlPlaneStartRejectsDuplicate(): void
210211 $ this ->postJson ('/webhooks/control-plane/start ' , [
211212 'workflow_type ' => 'test-greeting-workflow ' ,
212213 'instance_id ' => 'cp-dup-1 ' ,
213- 'arguments ' => Serializer::serialize ( ['Taylor ' ]),
214+ 'arguments ' => Serializer::serializeWithCodec (CodecRegistry:: defaultCodec (), ['Taylor ' ]),
214215 ])->assertStatus (202 );
215216
216217 $ response = $ this ->postJson ('/webhooks/control-plane/start ' , [
217218 'workflow_type ' => 'test-greeting-workflow ' ,
218219 'instance_id ' => 'cp-dup-1 ' ,
219- 'arguments ' => Serializer::serialize ( ['Taylor ' ]),
220+ 'arguments ' => Serializer::serializeWithCodec (CodecRegistry:: defaultCodec (), ['Taylor ' ]),
220221 ]);
221222
222223 $ response ->assertStatus (409 );
@@ -229,13 +230,13 @@ public function testControlPlaneStartReturnsExistingActive(): void
229230 $ this ->postJson ('/webhooks/control-plane/start ' , [
230231 'workflow_type ' => 'test-greeting-workflow ' ,
231232 'instance_id ' => 'cp-reuse-1 ' ,
232- 'arguments ' => Serializer::serialize ( ['Taylor ' ]),
233+ 'arguments ' => Serializer::serializeWithCodec (CodecRegistry:: defaultCodec (), ['Taylor ' ]),
233234 ])->assertStatus (202 );
234235
235236 $ response = $ this ->postJson ('/webhooks/control-plane/start ' , [
236237 'workflow_type ' => 'test-greeting-workflow ' ,
237238 'instance_id ' => 'cp-reuse-1 ' ,
238- 'arguments ' => Serializer::serialize ( ['Taylor ' ]),
239+ 'arguments ' => Serializer::serializeWithCodec (CodecRegistry:: defaultCodec (), ['Taylor ' ]),
239240 'duplicate_start_policy ' => 'return_existing_active ' ,
240241 ]);
241242
@@ -268,7 +269,7 @@ public function testControlPlaneStartWithVisibilityMetadata(): void
268269 $ response = $ this ->postJson ('/webhooks/control-plane/start ' , [
269270 'workflow_type ' => 'test-greeting-workflow ' ,
270271 'instance_id ' => 'cp-vis-1 ' ,
271- 'arguments ' => Serializer::serialize ( ['Taylor ' ]),
272+ 'arguments ' => Serializer::serializeWithCodec (CodecRegistry:: defaultCodec (), ['Taylor ' ]),
272273 'business_key ' => 'order-123 ' ,
273274 'labels ' => [
274275 'tenant ' => 'acme ' ,
@@ -289,7 +290,7 @@ public function testControlPlaneStartWithAutoGeneratedInstanceId(): void
289290 {
290291 $ response = $ this ->postJson ('/webhooks/control-plane/start ' , [
291292 'workflow_type ' => 'test-greeting-workflow ' ,
292- 'arguments ' => Serializer::serialize ( ['Taylor ' ]),
293+ 'arguments ' => Serializer::serializeWithCodec (CodecRegistry:: defaultCodec (), ['Taylor ' ]),
293294 ]);
294295
295296 $ response ->assertStatus (202 );
@@ -319,7 +320,7 @@ private function createWaitingRun(): WorkflowRun
319320 'workflow_class ' => TestGreetingWorkflow::class,
320321 'workflow_type ' => 'test-greeting-workflow ' ,
321322 'status ' => RunStatus::Waiting->value ,
322- 'arguments ' => Serializer::serialize ( ['Taylor ' ]),
323+ 'arguments ' => Serializer::serializeWithCodec (CodecRegistry:: defaultCodec (), ['Taylor ' ]),
323324 'connection ' => 'redis ' ,
324325 'queue ' => 'default ' ,
325326 'compatibility ' => 'build-a ' ,
@@ -350,7 +351,7 @@ private function createActivityTask(): array
350351 'activity_type ' => 'test-greeting-activity ' ,
351352 'sequence ' => 1 ,
352353 'status ' => ActivityStatus::Pending->value ,
353- 'arguments ' => Serializer::serialize ( ['Taylor ' ]),
354+ 'arguments ' => Serializer::serializeWithCodec (CodecRegistry:: defaultCodec (), ['Taylor ' ]),
354355 'connection ' => 'redis ' ,
355356 'queue ' => 'default ' ,
356357 'attempt_count ' => 0 ,
0 commit comments