Closed LordSimal closed 2 years ago
Same here. I fixed the above error by initializing the service with
'timeout' => 60,
'proxyServer' => null,
in the ArrayConfiguration, but when calling getAllProjects() on the service, I'm now getting "Typed property JiraRestApi\Project\Project::$description must not be accessed before initialization" when trying to access the description.
Using v4.0.1 with PHP 8.1.2 and symfony 6.1.1
I'm so sorry for the late reply. Could you check if this commit resolved your problem?
Looks good for me 👍🏻
$description still fails without default, I have created a pull request, see #447
Updated from 4.0.0 to 4.0.1 and now I am getting:
Problem
Since PHP 7.4 typed properties are possible but those don't have a default value of
null
.Solution
Therefore it would be nice if
AbstractConfiguration
would have some reasonable default values for those properties.This is is needed for all properties because e.g.
protected ?string $proxyServer;
doesn't have a null default value as well as you see here after manually setting the timeout in my config: