temporalio / temporalio/sdk-php
Improve PHP files generated from proto
Open
@roxblnfk is already working on this.
Since Sep 1, 2023.
enhancement
- 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.
There are a lot of Psalm issues related with usage of PHP files generated from proto (messages).
For example:
$details = $info->hasDetails()
// psalm: PossiblyNullArgument: Argument 1 of EncodedValues::fromPayloads cannot be null, possibly null value provided
? EncodedValues::fromPayloads($info->getDetails(), $converter)
: EncodedValues::empty();
Describe the solution you'd like
That case will be fixed if we add additional annotations in generated files fike this:
/**
* ...
* @psalm-mutation-free
*/
public function getDetails() { ... }
/**
* @psalm-assert-if-true !null $this->getDetails()
* @psalm-mutation-free
*/
public function hasDetails() { ... }
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.
Assessment
This issue has not been assessed yet.