Skip to content

Commit 60d4138

Browse files
committed
Add Temporal workflow as sample data
1 parent 6dd158f commit 60d4138

4 files changed

Lines changed: 28 additions & 2 deletions

File tree

installer/Application/ComposerPackages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ enum ComposerPackages: string
2121
case CycleBridge = 'spiral/cycle-bridge:^2.11';
2222
case DoctrineCollections = 'doctrine/collections:^2.3';
2323
case LoophpCollections = 'loophp/collection:^7.6';
24-
case IlluminateCollections = 'illuminate/collections:^12.0';
24+
case IlluminateCollections = 'illuminate/collections:8 - 12';
2525
case RoadRunnerGRPC = 'spiral/roadrunner-grpc:^3.5';
2626
case SpiralValidator = 'spiral/validator:^1.5';
2727
case SymfonyValidator = 'spiral-packages/symfony-validator:^1.5';

installer/Module/RoadRunnerBridge/resources/config/grpc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* You can download the binary here: https://github.com/roadrunner-server/roadrunner/releases
1414
* Default: null
1515
*/
16-
'binaryPath' => directory('root') . 'protoc-gen-php-grpc',
16+
'binaryPath' => directory('root') . 'protoc-gen-php-grpc' . (\PHP_OS_FAMILY === 'Windows' ? '.exe' : ''),
1717

1818
/**
1919
* Path, where generated DTO files put.

installer/Module/TemporalBridge/Package.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Installer\Internal\Readme\Section;
1111
use Installer\Module\TemporalBridge\Generator\Bootloaders;
1212
use Installer\Module\TemporalBridge\Generator\Env;
13+
use Installer\Module\TemporalBridge\Generator\Skeleton;
1314

1415
final class Package extends BasePackage
1516
{
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace App\Endpoint\Temporal;
6+
7+
use Spiral\TemporalBridge\Attribute\AssignWorker;
8+
use Temporal\Workflow\WorkflowInterface;
9+
use Temporal\Workflow\WorkflowMethod;
10+
11+
/**
12+
* This is a simple ping workflow that does nothing.
13+
*
14+
* @link https://docs.temporal.io/develop/php/
15+
*/
16+
#[AssignWorker('my-task-queue')]
17+
#[WorkflowInterface]
18+
class Ping
19+
{
20+
#[WorkflowMethod(name: 'ping')]
21+
public function handle()
22+
{
23+
return 'pong';
24+
}
25+
}

0 commit comments

Comments
 (0)