Is your feature request related to a problem? Please describe.
In InvokeActivity::handle
$context = $context->withInstance($instance->getContext())
This is confusing.
ActivityProtoType::getInstance and ActivityProtoType::withInstance are very confusing because the word "instance" means a different thing in these methods.
Describe the solution you'd like
- Rename
Instance to InstanceWrapper, same for ActivityInstance and WorkflowInstance.
- Rename
ActivityInstance::$context to ActivityInstanceWrapper::$instance, same for WorkflowInstance.
and change the relevant getters as well. The code above would change to
$context = $context->withInstance($instanceWrapper->getInstance())
That's much more intuitive, isn't it?
ActivityPrototype::getInstance becomes getInstanceWrapper, which, again, I believe to be much more clear.
Additional context
I could submit a PR if this suggestion is something you like.
Is your feature request related to a problem? Please describe.
In
InvokeActivity::handle$context = $context->withInstance($instance->getContext())This is confusing.
ActivityProtoType::getInstanceandActivityProtoType::withInstanceare very confusing because the word "instance" means a different thing in these methods.Describe the solution you'd like
InstancetoInstanceWrapper, same forActivityInstanceandWorkflowInstance.ActivityInstance::$contexttoActivityInstanceWrapper::$instance, same forWorkflowInstance.and change the relevant getters as well. The code above would change to
$context = $context->withInstance($instanceWrapper->getInstance())That's much more intuitive, isn't it?
ActivityPrototype::getInstancebecomesgetInstanceWrapper, which, again, I believe to be much more clear.Additional context
I could submit a PR if this suggestion is something you like.