-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #515: Fix SearchAttributes in ChildWorkflow
- Loading branch information
Showing
12 changed files
with
354 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of Temporal package. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Temporal\Internal\Marshaller\Meta; | ||
|
||
use Spiral\Attributes\NamedArgumentConstructor; | ||
use Temporal\Internal\Marshaller\Type\AssocArrayType; | ||
|
||
/** | ||
* The same as {@see MarshalArray}, but it forces the marshaller to treat the property as an associative array. | ||
* Useful when you send an empty array, but the recipient can't handle it because expects an object, | ||
* but PHP's {@see json_encode()} encodes an empty array as a list `[]` instead of an object `{}`. | ||
* | ||
* @Annotation | ||
* @NamedArgumentConstructor | ||
* @Target({ "PROPERTY", "METHOD" }) | ||
*/ | ||
#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::IS_REPEATABLE), NamedArgumentConstructor] | ||
final class MarshalAssocArray extends Marshal | ||
{ | ||
/** | ||
* @param string|null $name | ||
* @param Marshal|string|null $of | ||
* @param bool $nullable | ||
*/ | ||
public function __construct( | ||
string $name = null, | ||
Marshal|string|null $of = null, | ||
bool $nullable = true, | ||
) { | ||
parent::__construct($name, AssocArrayType::class, $of, $nullable); | ||
} | ||
} |
Oops, something went wrong.