buyanov / symfony-temporal-worker
symfony应用的Temporal工作进程
0.1.3
2024-02-27 06:33 UTC
Requires
- php: >=8.0
- ext-grpc: *
- ext-protobuf: *
- spiral/roadrunner: ^2023.2
- symfony/framework-bundle: ^6.0 || ^7.0
- temporal/sdk: ^2.7
Requires (Dev)
- phpunit/phpunit: ^10.3
This package is auto-updated.
Last update: 2024-09-09 06:49:41 UTC
README
为了注册活动和工作流,需要分别使用
#[AutoconfigureTag('temporal.activity')] #[AutoconfigureTag('temporal.workflow')]
相应。
活动示例
<?php namespace App\Temporal\Activity; use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; use Temporal\Activity\ActivityInterface; use Temporal\Activity\ActivityMethod; #[AutoconfigureTag('temporal.activity')] #[ActivityInterface('ProductProperty.')] interface ProductPropertyActivityInterface { #[ActivityMethod('createOrUpdateProductProperty')] public function createOrUpdateProductProperty(string $productGuid, string $propertyNameGuid, string $value): string; }