Skip to content

Commit f0c1ff4

Browse files
committed
Update required RoadRunner version and docs
1 parent 95a93eb commit f0c1ff4

File tree

3 files changed

+43
-2
lines changed

3 files changed

+43
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"roadrunner-php/roadrunner-api-dto": "^1.10.0",
3535
"roadrunner-php/version-checker": "^1.0.1",
3636
"spiral/attributes": "^3.1.8",
37-
"spiral/roadrunner": "^2024.3.2",
37+
"spiral/roadrunner": "^2024.3.3",
3838
"spiral/roadrunner-cli": "^2.6",
3939
"spiral/roadrunner-kv": "^4.3",
4040
"spiral/roadrunner-worker": "^3.6.1",

src/Workflow.php

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,9 +904,42 @@ public static function allHandlersFinished(): bool
904904
}
905905

906906
/**
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+
* ```
908938
*
909939
* @param array<string, mixed> $values
940+
*
941+
* @since SDK 2.13.0
942+
* @since RoadRunner 2024.3.3
910943
*/
911944
public static function upsertMemo(array $values): void
912945
{
@@ -933,6 +966,8 @@ public static function upsertSearchAttributes(array $searchAttributes): void
933966
* );
934967
* ```
935968
*
969+
* @since SDK 2.13.0
970+
* @since RoadRunner 2024.3.2
936971
* @link https://docs.temporal.io/visibility#search-attribute
937972
*/
938973
public static function upsertTypedSearchAttributes(SearchAttributeUpdate ...$updates): void

src/Workflow/WorkflowContextInterface.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,10 @@ public function allHandlersFinished(): bool;
327327
* ```
328328
*
329329
* @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
330334
*/
331335
public function upsertMemo(array $values): void;
332336

@@ -347,6 +351,8 @@ public function upsertSearchAttributes(array $searchAttributes): void;
347351
* );
348352
* ```
349353
*
354+
* @since SDK 2.13.0
355+
* @since RoadRunner 2024.3.2
350356
* @link https://docs.temporal.io/visibility#search-attribute
351357
*/
352358
public function upsertTypedSearchAttributes(SearchAttributeUpdate ...$updates): void;

0 commit comments

Comments
 (0)