Skip to content

Commit 45f0297

Browse files
committed
Fix BC in WorkerFactory constructor
1 parent fb4d5ec commit 45f0297

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/WorkerFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ class WorkerFactory implements WorkerFactoryInterface, LoopInterface
105105
public function __construct(
106106
DataConverterInterface $dataConverter,
107107
protected RPCConnectionInterface $rpc,
108-
ServiceCredentials $credentials,
108+
?ServiceCredentials $credentials = null,
109109
) {
110110
$this->converter = $dataConverter;
111-
$this->boot($credentials);
111+
$this->boot($credentials ?? ServiceCredentials::create());
112112
}
113113

114114
public static function create(
@@ -119,7 +119,7 @@ public static function create(
119119
return new static(
120120
$converter ?? DataConverter::createDefault(),
121121
$rpc ?? Goridge::create(),
122-
$credentials ?? ServiceCredentials::create(),
122+
$credentials,
123123
);
124124
}
125125

0 commit comments

Comments
 (0)