Skip to content

Cannot create Version #11

@brutto

Description

@brutto

Model Version src/Issue/Version.php has $releaseDate prop described as follow:

...
public ?DateTimeInterface $releaseDate;
...

But on VersionService::create() we have this kind of:

    public function create($version)
    {
        if ($version->releaseDate instanceof \DateTimeInterface) {
            $version->releaseDate = $version->releaseDate->format('Y-m-d');
        }
     ...

Runing with strict-type enabledyou will get one of two errors:

  • Cannot assign string to property JiraCloud\Issue\Version::$releaseDate of type ?DateTimeInterface
  • Typed property JiraCloud\Issue\Version::$releaseDate must not be accessed before initialization

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions