File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class WorkerDeploymentOptions
25
25
private readonly bool $ useVersioning ;
26
26
27
27
#[Marshal(name: 'Version ' , nullable: true )]
28
- private readonly ?string $ version ;
28
+ private readonly ?WorkerDeploymentVersion $ version ;
29
29
30
30
#[Marshal(name: 'DefaultVersioningBehavior ' , type: EnumValueType::class)]
31
31
private readonly VersioningBehavior $ defaultVersioningBehavior ;
@@ -62,7 +62,7 @@ public function withUseVersioning(bool $value): self
62
62
public function withVersion (string |WorkerDeploymentVersion $ version ): self
63
63
{
64
64
/** @see self::$version */
65
- return $ this ->with ('version ' , ( string ) $ version );
65
+ return $ this ->with ('version ' , \is_string ( $ version ) ? WorkerDeploymentVersion:: fromString ( $ version ) : $ version );
66
66
}
67
67
68
68
/**
Original file line number Diff line number Diff line change 5
5
namespace Temporal \Worker \Versioning ;
6
6
7
7
use Temporal \Exception \InvalidArgumentException ;
8
+ use Temporal \Internal \Marshaller \Meta \Marshal ;
8
9
use Temporal \Internal \Traits \CloneWith ;
9
10
10
11
/**
@@ -23,11 +24,13 @@ private function __construct(
23
24
* The combination of {@see $deployment_name} and {@see $buildId} uniquely identifies this
24
25
* Version within the namespace, because Deployment names are unique within a namespace.
25
26
*/
27
+ #[Marshal('DeploymentName ' )]
26
28
public readonly string $ deploymentName ,
27
29
28
30
/**
29
31
* Identifies the Worker Deployment this Version is part of.
30
32
*/
33
+ #[Marshal('BuildId ' )]
31
34
public readonly string $ buildId ,
32
35
) {}
33
36
You can’t perform that action at this time.
0 commit comments