DX: type-hing oneToMany and ManyToMany properties as collection

This commit is contained in:
2023-07-19 16:21:17 +02:00
parent 224c2c74e8
commit 075aca493b
32 changed files with 130 additions and 73 deletions

View File

@@ -28,9 +28,10 @@ use Symfony\Component\Serializer\Annotation\Groups;
class SocialIssue
{
/**
* @var Collection<SocialIssue>
* @ORM\OneToMany(targetEntity=SocialIssue::class, mappedBy="parent")
*/
private $children;
private Collection $children;
/**
* @ORM\Column(type="datetime", nullable=true)
@@ -55,9 +56,10 @@ class SocialIssue
private $parent;
/**
* @var Collection<SocialAction>
* @ORM\OneToMany(targetEntity=SocialAction::class, mappedBy="issue")
*/
private $socialActions;
private Collection $socialActions;
/**
* @ORM\Column(type="json")