[Bug] WorkerFactoryInterface seems to be missing arguments for newWorker() method
What are you really trying to do?
Setting a ExceptionInterceptorInterface and PipelineProvider with the newWorker method.
Describe the bug
The interface method is:
public function newWorker(
string $taskQueue = self::DEFAULT_TASK_QUEUE,
?WorkerOptions $options = null,
): WorkerInterface;
But the actual implementation is:
public function newWorker(
string $taskQueue = self::DEFAULT_TASK_QUEUE,
?WorkerOptions $options = null,
?ExceptionInterceptorInterface $exceptionInterceptor = null,
?PipelineProvider $interceptorProvider = null,
): WorkerInterface {
// .. implementation
}
Minimal Reproduction
Not really relevant, just install the sdk.
Environment/Versions
Also irrelevant.
Additional context
The interface should describe the full method with all arguments.
The interface is in the public space, so changing it can be considered a breaking change (even though it's not intended to be implemented by the user). Overall, there is no strong reason to update it for now.
Is it really a breaking change when they are defaulted to null anyway? That means they can be omitted right?
If we add parameters to the interface method, we will break all implementations that we do not control.