Skip to content

Commit 0dba125

Browse files
committed
Fix PHP8.4 nullable types deprecations
1 parent a271938 commit 0dba125

File tree

83 files changed

+230
-230
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+230
-230
lines changed

src/Activity/ActivityMethod.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ final class ActivityMethod
3333
#[Immutable]
3434
public ?string $name = null;
3535

36-
public function __construct(string $name = null)
36+
public function __construct(?string $name = null)
3737
{
3838
$this->name = $name;
3939
}

src/Activity/ActivityOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function __construct()
125125
/**
126126
* @return $this
127127
*/
128-
public function mergeWith(MethodRetry $retry = null): self
128+
public function mergeWith(?MethodRetry $retry = null): self
129129
{
130130
$self = clone $this;
131131

src/Activity/ActivityOptionsInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
*/
1212
interface ActivityOptionsInterface
1313
{
14-
public function mergeWith(MethodRetry $retry = null): self;
14+
public function mergeWith(?MethodRetry $retry = null): self;
1515
}

src/Activity/LocalActivityOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function __construct()
8181
/**
8282
* @return $this
8383
*/
84-
public function mergeWith(MethodRetry $retry = null): self
84+
public function mergeWith(?MethodRetry $retry = null): self
8585
{
8686
$self = clone $this;
8787

src/Client/GRPC/BaseClient.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ public static function create(string $address): static
9191
*/
9292
public static function createSSL(
9393
string $address,
94-
string $crt = null,
95-
string $clientKey = null,
96-
string $clientPem = null,
97-
string $overrideServerName = null,
94+
?string $crt = null,
95+
?string $clientKey = null,
96+
?string $clientPem = null,
97+
?string $overrideServerName = null,
9898
): static {
9999
if (!\extension_loaded('grpc')) {
100100
throw new \RuntimeException('The gRPC extension is required to use Temporal Client.');

src/Client/GRPC/ServiceClient.php

Lines changed: 62 additions & 62 deletions
Large diffs are not rendered by default.

src/Client/ScheduleClient.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ final class ScheduleClient implements ScheduleClientInterface
4848

4949
public function __construct(
5050
ServiceClientInterface $serviceClient,
51-
ClientOptions $options = null,
52-
DataConverterInterface $converter = null,
51+
?ClientOptions $options = null,
52+
?DataConverterInterface $converter = null,
5353
) {
5454
$this->client = $serviceClient;
5555
$this->clientOptions = $options ?? new ClientOptions();
@@ -62,8 +62,8 @@ public function __construct(
6262

6363
public static function create(
6464
ServiceClientInterface $serviceClient,
65-
ClientOptions $options = null,
66-
DataConverterInterface $converter = null,
65+
?ClientOptions $options = null,
66+
?DataConverterInterface $converter = null,
6767
): ScheduleClientInterface {
6868
return new self($serviceClient, $options, $converter);
6969
}

src/Client/WorkflowClient.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ class WorkflowClient implements WorkflowClientInterface
6666

6767
public function __construct(
6868
ServiceClientInterface $serviceClient,
69-
ClientOptions $options = null,
70-
DataConverterInterface $converter = null,
71-
PipelineProvider $interceptorProvider = null,
69+
?ClientOptions $options = null,
70+
?DataConverterInterface $converter = null,
71+
?PipelineProvider $interceptorProvider = null,
7272
) {
7373
$this->client = $serviceClient;
7474
$this->interceptorPipeline = ($interceptorProvider ?? new SimplePipelineProvider())
@@ -83,9 +83,9 @@ public function __construct(
8383
*/
8484
public static function create(
8585
ServiceClientInterface $serviceClient,
86-
ClientOptions $options = null,
87-
DataConverterInterface $converter = null,
88-
PipelineProvider $interceptorProvider = null,
86+
?ClientOptions $options = null,
87+
?DataConverterInterface $converter = null,
88+
?PipelineProvider $interceptorProvider = null,
8989
): self {
9090
return new self($serviceClient, $options, $converter, $interceptorProvider);
9191
}
@@ -207,7 +207,7 @@ public function startWithSignal(
207207

208208
public function newWorkflowStub(
209209
string $class,
210-
WorkflowOptions $options = null,
210+
?WorkflowOptions $options = null,
211211
): object {
212212
$workflow = $this->reader->fromClass($class);
213213

@@ -220,7 +220,7 @@ public function newWorkflowStub(
220220

221221
public function newUntypedWorkflowStub(
222222
string $workflowType,
223-
WorkflowOptions $options = null,
223+
?WorkflowOptions $options = null,
224224
): WorkflowStubInterface {
225225
$options ??= new WorkflowOptions();
226226

src/Client/WorkflowClientInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function startWithSignal(
6262
*/
6363
public function newWorkflowStub(
6464
string $class,
65-
WorkflowOptions $options = null,
65+
?WorkflowOptions $options = null,
6666
): object;
6767

6868
/**
@@ -78,7 +78,7 @@ public function newWorkflowStub(
7878
*/
7979
public function newUntypedWorkflowStub(
8080
string $workflowType,
81-
WorkflowOptions $options = null,
81+
?WorkflowOptions $options = null,
8282
): WorkflowStubInterface;
8383

8484
/**

src/Client/WorkflowOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public function __construct()
166166
*
167167
* @return self return a new {@see self} instance with merged options
168168
*/
169-
public function mergeWith(MethodRetry $retry = null, CronSchedule $cron = null): self
169+
public function mergeWith(?MethodRetry $retry = null, ?CronSchedule $cron = null): self
170170
{
171171
$self = clone $this;
172172

0 commit comments

Comments
 (0)