temporalio / temporalio/sdk-php
[Discussion] Define a backwards compatibility promise
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 421
- Forks
- 64
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 11
Description
Is your feature request related to a problem? Please describe.
I started to use Temporal a few months ago and I really like it and this SDK. I think you (the maintainers and community) have done an excellent job and I am impressed by many things. The use of Generators in Scope::next() is genius.
I am doing a private Symfony bundle around this package and I've found it a little difficult to work with.
Issue 1
We break backwards compatibility between releases. Here are some examples, but there are many more.
2.9.0
Temporal\Client\ScheduleClient::getHandle()changed signature.Temporal\Client\ServerCapabilitieswas removed in a way that breaks BC.Temporal\Client\WorkflowExecutionHistorywas moved toTemporal\Client\Workflow\WorkflowExecutionHistoryTemporal\Client\WorkflowClienthave many methods changing their signatures.
2.10.0
Temporal\Activity\ActivityCancellationTypewas converted to enumTemporal\Workflow\ChildWorkflowCancellationTypewas converted to enumTemporal\Activity\ActivityOptions::withCancellationType()has changed signatureTemporal\Worker\ChildWorkflowCancellationTypewas removed in a way that breaks BC.
Issue 2
We have a bunch of classes in the internal namespace. I suggest all of them should be marked with @internal for better IDE support. But I also see parts of our public API returning internal classes. Example:
Temporal\Worker\Worker::getWorkflows(): RepositoryInterface
Describe the solution you'd like
I would like us, staring with the next minor release, to follow BC very strictly. I suggest to write down a BC promise what it means for us and what third party libraries and application authors can expect from us. Ie, we don't need to be super generous, but we need to be predictable.
Additional context
There is no secret that I am a big fan of Symfony's BC promise. In the best of all worlds, I think we should follow the same promise. Just write a statement in our readme that we follow the same practices.
There is also the Roave/BackwardCompatibilityCheck that will check for any BC breaks as part of the CI workflow.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with the README and the Symfony BC promise linked in the issue, then review the proposed Roave/BackwardCompatibilityCheck integration for the CI workflow. Done means the project’s backwards-compatibility promise and treatment of internal APIs are documented, with the requested compatibility check addressed in the workflow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- ci-cd, documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100