lesstif / php-jira-rest-client

PHP classes interact Jira with the REST API.
Other
510 stars 263 forks source link

Empty customField #525

Closed flack closed 7 months ago

flack commented 11 months ago

I have been using 3.1.1 until now and for a radiobutton customField I used

$issueField->addCustomField('customfield_12345', null);

to remove a previous selection. This has worked fine so far, but newer releases don't allow null any more. I've tried using [] and some other variants instead, but none of them work (I get jira errors then). If I remove the typehint, it seems to work. Is there some other way to accomplish this, or should I send a PR that changes the typehint to look like this?

public function addCustomField(string $key, null|string|int|float|array $value): static
lesstif commented 7 months ago

Thank you @flack. I've merged right now!