File tree Expand file tree Collapse file tree 14 files changed +80
-30
lines changed Expand file tree Collapse file tree 14 files changed +80
-30
lines changed Original file line number Diff line number Diff line change 2727 "google/common-protos" : " ^4.9" ,
2828 "google/protobuf" : " ^4.31.1" ,
2929 "grpc/grpc" : " ^1.57" ,
30+ "internal/destroy" : " ^1.0" ,
3031 "internal/promise" : " ^2.12" ,
3132 "nesbot/carbon" : " ^2.72.6 || ^3.8.4" ,
3233 "psr/log" : " ^2.0 || ^3.0.2" ,
Original file line number Diff line number Diff line change 569569 <code ><![CDATA[ \IteratorAggregate]]> </code >
570570 </MissingTemplateParam >
571571 </file >
572+ <file src =" src/Internal/Declaration/Instance.php" >
573+ <RedundantCondition >
574+ <code ><![CDATA[ isset($this->context)]]> </code >
575+ </RedundantCondition >
576+ </file >
572577 <file src =" src/Internal/Declaration/Instantiator/ActivityInstantiator.php" >
573578 <InvalidDocblock >
574579 <code ><![CDATA[ final class ActivityInstantiator extends Instantiator]]> </code >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1111
1212namespace Temporal \Internal \Declaration ;
1313
14+ use Internal \Destroy \Destroyable ;
1415use Temporal \Exception \InstantiationException ;
1516use Temporal \Internal \Declaration \Prototype \Prototype ;
1617
@@ -46,6 +47,7 @@ public function getHandler(): MethodHandler
4647
4748 public function destroy (): void
4849 {
50+ isset ($ this ->context ) and $ this ->context instanceof Destroyable and $ this ->context ->destroy ();
4951 unset($ this ->handler , $ this ->context );
5052 }
5153
Original file line number Diff line number Diff line change 1111
1212namespace Temporal \Internal \Declaration \WorkflowInstance ;
1313
14+ use Internal \Destroy \Destroyable ;
1415use Temporal \Api \Sdk \V1 \WorkflowInteractionDefinition ;
1516use Temporal \DataConverter \ValuesInterface ;
1617use Temporal \Interceptor \WorkflowInbound \QueryInput ;
17- use Temporal \Internal \Declaration \Destroyable ;
1818use Temporal \Internal \Declaration \MethodHandler ;
1919use Temporal \Internal \Declaration \Prototype \QueryDefinition ;
2020use Temporal \Internal \Declaration \Prototype \WorkflowPrototype ;
Original file line number Diff line number Diff line change 1111
1212namespace Temporal \Internal \Declaration \WorkflowInstance ;
1313
14+ use Internal \Destroy \Destroyable ;
1415use Temporal \Api \Sdk \V1 \WorkflowInteractionDefinition ;
1516use Temporal \DataConverter \ValuesInterface ;
16- use Temporal \Internal \Declaration \Destroyable ;
1717use Temporal \Internal \Declaration \MethodHandler ;
1818use Temporal \Internal \Declaration \Prototype \SignalDefinition ;
1919use Temporal \Internal \Declaration \Prototype \WorkflowPrototype ;
Original file line number Diff line number Diff line change 1111
1212namespace Temporal \Internal \Declaration \WorkflowInstance ;
1313
14+ use Internal \Destroy \Destroyable ;
1415use React \Promise \Deferred ;
1516use React \Promise \PromiseInterface ;
1617use Temporal \Api \Sdk \V1 \WorkflowInteractionDefinition ;
1718use Temporal \DataConverter \ValuesInterface ;
1819use Temporal \Interceptor \WorkflowInbound \UpdateInput ;
19- use Temporal \Internal \Declaration \Destroyable ;
2020use Temporal \Internal \Declaration \MethodHandler ;
2121use Temporal \Internal \Declaration \Prototype \UpdateDefinition ;
2222use Temporal \Internal \Declaration \Prototype \WorkflowPrototype ;
Original file line number Diff line number Diff line change 1111
1212namespace Temporal \Internal \Transport ;
1313
14+ use Internal \Destroy \Destroyable ;
1415use React \Promise \PromiseInterface ;
15- use Temporal \Internal \Declaration \Destroyable ;
1616use Temporal \Worker \Transport \Command \CommandInterface ;
1717use Temporal \Worker \Transport \Command \RequestInterface ;
1818use Temporal \Worker \Transport \Command \ServerResponseInterface ;
Original file line number Diff line number Diff line change 1111
1212namespace Temporal \Internal \Workflow \Process ;
1313
14+ use Internal \Destroy \Destroyable ;
1415use React \Promise \Deferred ;
1516use React \Promise \PromiseInterface ;
1617use Temporal \DataConverter \EncodedValues ;
2021use Temporal \Exception \Failure \TemporalFailure ;
2122use Temporal \Exception \InvalidArgumentException ;
2223use Temporal \Interceptor \WorkflowInbound \UpdateInput ;
23- use Temporal \Internal \Declaration \Destroyable ;
2424use Temporal \Internal \Declaration \MethodHandler ;
2525use Temporal \Internal \ServiceContainer ;
2626use Temporal \Internal \Transport \Request \Cancel ;
@@ -296,6 +296,7 @@ public function destroy(): void
296296 $ this ->context ?->destroy();
297297 $ this ->scopeContext ?->destroy();
298298 unset(
299+ $ this ->coroutine ,
299300 $ this ->context ,
300301 $ this ->scopeContext ,
301302 $ this ->deferred ,
Original file line number Diff line number Diff line change 1111
1212namespace Temporal \Internal \Workflow ;
1313
14+ use Internal \Destroy \Destroyable ;
1415use Psr \Log \LoggerInterface ;
1516use Ramsey \Uuid \UuidInterface ;
1617use React \Promise \Deferred ;
4243use Temporal \Interceptor \WorkflowOutboundCalls \UpsertTypedSearchAttributesInput ;
4344use Temporal \Interceptor \WorkflowOutboundCallsInterceptor ;
4445use Temporal \Interceptor \WorkflowOutboundRequestInterceptor ;
45- use Temporal \Internal \Declaration \Destroyable ;
4646use Temporal \Internal \Declaration \EntityNameValidator ;
4747use Temporal \Internal \Declaration \WorkflowInstance \QueryDispatcher ;
4848use Temporal \Internal \Declaration \WorkflowInstance \SignalDispatcher ;
@@ -701,10 +701,10 @@ public function destroy(): void
701701 {
702702 $ this ->awaits = [];
703703 $ this ->client ->destroy ();
704- $ this ->workflowInstance ->destroy ();
705704 $ this ->queryDispatcher ->destroy ();
706705 $ this ->signalDispatcher ->destroy ();
707706 $ this ->updateDispatcher ->destroy ();
707+ $ this ->workflowInstance ->destroy ();
708708 unset($ this ->workflowInstance , $ this ->client );
709709 }
710710
You can’t perform that action at this time.
0 commit comments