diff --git a/psalm-baseline.xml b/psalm-baseline.xml
index bf156c41..298b54e1 100644
--- a/psalm-baseline.xml
+++ b/psalm-baseline.xml
@@ -1443,6 +1443,9 @@
+
+
+
responses)]]>
@@ -1477,7 +1480,7 @@
diff --git a/src/WorkerFactory.php b/src/WorkerFactory.php
index b2629dcd..b2ed3173 100644
--- a/src/WorkerFactory.php
+++ b/src/WorkerFactory.php
@@ -105,10 +105,10 @@ class WorkerFactory implements WorkerFactoryInterface, LoopInterface
public function __construct(
DataConverterInterface $dataConverter,
protected RPCConnectionInterface $rpc,
- ServiceCredentials $credentials,
+ ?ServiceCredentials $credentials = null,
) {
$this->converter = $dataConverter;
- $this->boot($credentials);
+ $this->boot($credentials ?? ServiceCredentials::create());
}
public static function create(
@@ -119,7 +119,7 @@ public static function create(
return new static(
$converter ?? DataConverter::createDefault(),
$rpc ?? Goridge::create(),
- $credentials ?? ServiceCredentials::create(),
+ $credentials,
);
}
diff --git a/testing/src/WorkerFactory.php b/testing/src/WorkerFactory.php
index bef26305..50b3e5ee 100644
--- a/testing/src/WorkerFactory.php
+++ b/testing/src/WorkerFactory.php
@@ -28,11 +28,11 @@ public function __construct(
DataConverterInterface $dataConverter,
RPCConnectionInterface $rpc,
ActivityInvocationCacheInterface $activityCache,
- ServiceCredentials $credentials,
+ ?ServiceCredentials $credentials = null,
) {
$this->activityCache = $activityCache;
- parent::__construct($dataConverter, $rpc, $credentials);
+ parent::__construct($dataConverter, $rpc, $credentials ?? ServiceCredentials::create());
}
public static function create(
@@ -45,7 +45,7 @@ public static function create(
$converter ?? DataConverter::createDefault(),
$rpc ?? Goridge::create(),
$activityCache ?? RoadRunnerActivityInvocationCache::create($converter),
- $credentials ?? ServiceCredentials::create(),
+ $credentials,
);
}