for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Zenstruck\Foundry\Tests\Fixtures\Entity\Cascade;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="category_cascade")
*/
class Category
{
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
private $id;
* @ORM\Column(type="string", length=255)
private $name;
* @ORM\ManyToMany(targetEntity=Product::class, inversedBy="categories")
private $products;
public function __construct()
$this->products = new ArrayCollection();
}
public function getId(): ?int
return $this->id;
public function getName(): ?string
return $this->name;
public function setName(?string $name): void
$this->name = $name;
public function getProducts(): Collection
return $this->products;