temporalio / temporalio/sdk-php

[Bug] WorkerFactoryInterface seems to be missing arguments for newWorker() method

Open
#573 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
421
Forks
64
Avg merge
1d 1h
Merged PRs (30d)
11

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read src/Worker/WorkerFactoryInterface.php and compare its newWorker() declaration with the implementation in src/WorkerFactory.php. Update the interface so it exposes the exception interceptor and pipeline provider arguments shown in the implementation, then verify the interface and implementation signatures remain consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.