-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Discussion] Define a backwards compatibility promise #495
Comments
Hi. Regarding Issue 1: I checked your comments on BC between minor releases. Am I correct in understanding that they were obtained automatically using Roave/BackwardCompatibilityCheck? 2.9.0
2.10.0
If we pay attention to the presence of aliases for removed classes or the previous work done with the marshaller, it becomes clear that we strive to adhere to semver and maintain backward compatibility where possible, without making various promises. If we strictly follow Symfony's BC promise, I'm afraid the PHP SDK code might become legacy-laden, and we won't be able to provide functionality on par with other SDKs. Perhaps we should consider marking classes/interfaces as risky for extension/implementation. |
No, most of them were obtained by my Symfony Bundle's CI started to fail. Then I looked at the diff and found some more to give some examples in this issue.
I saw that it was an attempt, but it was incorrectly done.
What if I have instantiated that class? Then it would break if the class was removed.
With all respect, I think you are wrong. There are always a way forward with keeping BC, but the "effort" might not be worth it. In such cases, write a good UPGRADE.md and tag a new major release. We wont run out of integers. =)
Yes, I believe so. We want to be helpful to all users of this SDK, that means we must be predictable. If I use an If we dont want to adjust how we do code changes, then this issue can be solved with documentation/comments only. But maybe some adjustments are needed. Suggestion: We add the BC promise CI job, that will make (too many) comments on each PR. These can then be discussed and fixed/ignored. |
If we want to move a class. we need to make sure the old class is still working. That means as extend, instantiate, return values etc.
Haha, yes. You are correct, but it is still a BC break.
That is fine. There is no harm in that. The most important thing is to be predictable and it should always work for all weird use cases. There is no gold medal if you keep version 2.x for 10 years.
Sure, I would be happy to. |
@Nyholm hi. Why weren't you happy with this decision? |
That looks like a nice bundle. We (the company I work for) started our own Symfony bundle back in 2021 and we are doing a lot of custom stuff that does not make sense to open source. If we were just starting our Temporal journey we should definitely consider that bundle. |
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\ServerCapabilities
was removed in a way that breaks BC.Temporal\Client\WorkflowExecutionHistory
was moved toTemporal\Client\Workflow\WorkflowExecutionHistory
Temporal\Client\WorkflowClient
have many methods changing their signatures.2.10.0
Temporal\Activity\ActivityCancellationType
was converted to enumTemporal\Workflow\ChildWorkflowCancellationType
was converted to enumTemporal\Activity\ActivityOptions::withCancellationType()
has changed signatureTemporal\Worker\ChildWorkflowCancellationType
was 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.
The text was updated successfully, but these errors were encountered: