File tree Expand file tree Collapse file tree 3 files changed +43
-2
lines changed Expand file tree Collapse file tree 3 files changed +43
-2
lines changed Original file line number Diff line number Diff line change 34
34
"roadrunner-php/roadrunner-api-dto" : " ^1.10.0" ,
35
35
"roadrunner-php/version-checker" : " ^1.0.1" ,
36
36
"spiral/attributes" : " ^3.1.8" ,
37
- "spiral/roadrunner" : " ^2024.3.2 " ,
37
+ "spiral/roadrunner" : " ^2024.3.3 " ,
38
38
"spiral/roadrunner-cli" : " ^2.6" ,
39
39
"spiral/roadrunner-kv" : " ^4.3" ,
40
40
"spiral/roadrunner-worker" : " ^3.6.1" ,
Original file line number Diff line number Diff line change @@ -904,9 +904,42 @@ public static function allHandlersFinished(): bool
904
904
}
905
905
906
906
/**
907
- * Upsert Memo
907
+ * Updates this Workflow's Memos by merging the provided memo with existing Memos.
908
+ *
909
+ * New Memo is merged by replacing properties of the same name at the first level only.
910
+ * Setting a property to {@see null} clears that key from the Memo.
911
+ *
912
+ * For example:
913
+ *
914
+ * ```php
915
+ * Workflow::upsertMemo([
916
+ * 'key1' => 'value',
917
+ * 'key3' => ['subkey1' => 'value']
918
+ * 'key4' => 'value',
919
+ * });
920
+ *
921
+ * Workflow::upsertMemo([
922
+ * 'key2' => 'value',
923
+ * 'key3' => ['subkey2' => 'value']
924
+ * 'key4' => null,
925
+ * ]);
926
+ * ```
927
+ *
928
+ * would result in the Workflow having these Memo:
929
+ *
930
+ * ```php
931
+ * [
932
+ * 'key1' => 'value',
933
+ * 'key2' => 'value',
934
+ * 'key3' => ['subkey2' => 'value'], // Note this object was completely replaced
935
+ * // Note that 'key4' was completely removed
936
+ * ]
937
+ * ```
908
938
*
909
939
* @param array<string, mixed> $values
940
+ *
941
+ * @since SDK 2.13.0
942
+ * @since RoadRunner 2024.3.3
910
943
*/
911
944
public static function upsertMemo (array $ values ): void
912
945
{
@@ -933,6 +966,8 @@ public static function upsertSearchAttributes(array $searchAttributes): void
933
966
* );
934
967
* ```
935
968
*
969
+ * @since SDK 2.13.0
970
+ * @since RoadRunner 2024.3.2
936
971
* @link https://docs.temporal.io/visibility#search-attribute
937
972
*/
938
973
public static function upsertTypedSearchAttributes (SearchAttributeUpdate ...$ updates ): void
Original file line number Diff line number Diff line change @@ -327,6 +327,10 @@ public function allHandlersFinished(): bool;
327
327
* ```
328
328
*
329
329
* @param array<non-empty-string, mixed> $values
330
+ *
331
+ * @since SDK 2.13.0
332
+ * @since RoadRunner 2024.3.3
333
+ * @link https://docs.temporal.io/glossary#memo
330
334
*/
331
335
public function upsertMemo (array $ values ): void ;
332
336
@@ -347,6 +351,8 @@ public function upsertSearchAttributes(array $searchAttributes): void;
347
351
* );
348
352
* ```
349
353
*
354
+ * @since SDK 2.13.0
355
+ * @since RoadRunner 2024.3.2
350
356
* @link https://docs.temporal.io/visibility#search-attribute
351
357
*/
352
358
public function upsertTypedSearchAttributes (SearchAttributeUpdate ...$ updates ): void ;
You can’t perform that action at this time.
0 commit comments