generated from yiisoft/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 11
Add temporal support and fallback to usual http runner if env is not RR #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
746ece0
Add temporal support and fallback to usual http runner if env is not RR
xepozz 8a1a4e9
Fix configs
xepozz 936e071
Fix config
xepozz c0852a9
Comment options
xepozz 65d3865
Apply fixes from StyleCI
StyleCIBot c32d74f
Fix definitions
xepozz c99692d
Merge remote-tracking branch 'origin/support-temporal' into support-t…
xepozz 3644e10
Apply fixes from StyleCI
StyleCIBot 0dee2d4
Add check for having the package
xepozz 2b03330
Move temporal to suggest section
xepozz 0514d31
[ci-review] Apply changes from Rector action.
ace3d81
Add readme
xepozz 37f1b62
Merge remote-tracking branch 'origin/support-temporal' into support-t…
xepozz 518b18f
Remove merge plan
xepozz 5cef2b3
Fix psalm
xepozz a8638c8
Add temporal/sdk to dev dependencies
xepozz 334aaaa
Apply suggestions from code review
samdark df56a93
Fix review comments
xepozz 7c8136d
Add changelog
xepozz 58eb4f5
Fix changelog
xepozz 6c8620c
Merge branch 'master' into support-temporal
xepozz d581509
Fix changelog
xepozz 46e7a29
Ignore optional symbols
xepozz cb59456
Merge branch 'master' into support-temporal
xepozz 2a76da1
Fix tests
xepozz 6d01866
Remove http runner fallback
xepozz 6ef4e5b
Enhance exception message, add test
xepozz 02531e2
Add missed methods
xepozz dc276ee
Add temporal exception test
xepozz fff05b0
Add smoke test for temporal
xepozz e976efb
Merge branch 'master' into support-temporal
samdark 3c6bfcc
Merge branch 'master' into support-temporal
xepozz d016c92
refactor temporal adapter components
xepozz dc0a030
update config group name
xepozz f6de929
move bridge params to the package
xepozz 62dddcf
fix psalm errors
xepozz 2fa101e
fix composer require checker errors
xepozz 73bee31
fix interface check
xepozz f79f0e7
mock missed classes
xepozz 883b9f2
Apply fixes from StyleCI
StyleCIBot d92e434
explicit host
xepozz 232d319
Merge remote-tracking branch 'origin/support-temporal' into support-t…
xepozz ea51238
fix psalm issue
xepozz 38d20a6
fix composer-require-checker
xepozz 0a6ad65
adopt readme
xepozz 15759ff
Apply suggestions from code review
xepozz 5d37aa1
Update tests/RoadRunnerHttpApplicationRunnerTest.php
xepozz eb296bc
Update README.md
xepozz d2b8c4a
Update README.md
xepozz 9f426c8
Apply suggestions from code review
xepozz e8193ec
Update README.md
xepozz 248e3e2
Update README.md
samdark File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,6 @@ | ||
{ | ||
"symbol-whitelist" : [ | ||
"Temporal\\Worker\\WorkerFactoryInterface", | ||
"Temporal\\Worker\\Transport\\HostConnectionInterface" | ||
] | ||
} |
This file contains hidden or 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 hidden or 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,57 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Temporal\Client\GRPC\ServiceClient; | ||
use Temporal\Client\GRPC\ServiceClientInterface; | ||
use Temporal\Client\WorkflowClient; | ||
use Temporal\Client\WorkflowClientInterface; | ||
use Temporal\DataConverter\DataConverter; | ||
use Temporal\DataConverter\DataConverterInterface; | ||
use Temporal\Worker\Transport\Goridge; | ||
use Temporal\Worker\Transport\HostConnectionInterface; | ||
use Temporal\Worker\Transport\RoadRunner; | ||
use Temporal\Worker\Transport\RPCConnectionInterface; | ||
use Temporal\Worker\WorkerFactoryInterface; | ||
use Temporal\WorkerFactory; | ||
use Yiisoft\Definitions\Reference; | ||
use Yiisoft\Yii\Runner\RoadRunner\Temporal\TemporalDeclarationProvider; | ||
|
||
/** | ||
* @var $params array | ||
*/ | ||
|
||
$temporalParams = $params['yiisoft/yii-runner-roadrunner']['temporal']; | ||
if (!($temporalParams['enabled'] ?? false)) { | ||
return []; | ||
} | ||
|
||
return [ | ||
DataConverterInterface::class => DataConverter::class, | ||
DataConverter::class => fn () => DataConverter::createDefault(), | ||
|
||
RPCConnectionInterface::class => Goridge::class, | ||
Goridge::class => fn () => Goridge::create(), | ||
|
||
WorkerFactoryInterface::class => WorkerFactory::class, | ||
WorkerFactory::class => fn () => WorkerFactory::create(), | ||
|
||
HostConnectionInterface::class => RoadRunner::class, | ||
RoadRunner::class => fn () => RoadRunner::create(), | ||
|
||
WorkflowClientInterface::class => WorkflowClient::class, | ||
WorkflowClient::class => [ | ||
'class' => WorkflowClient::class, | ||
'__construct()' => [ | ||
Reference::to(ServiceClientInterface::class), | ||
], | ||
], | ||
|
||
ServiceClientInterface::class => ServiceClient::class, | ||
ServiceClient::class => fn () => ServiceClient::create($temporalParams['host']), | ||
|
||
TemporalDeclarationProvider::class => fn () => new TemporalDeclarationProvider( | ||
$temporalParams['workflows'] ?? [], | ||
$temporalParams['activities'] ?? [], | ||
), | ||
]; |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.