You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've set up a working UUID like this as per Symfony documentation:
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
use Symfony\Bridge\Doctrine\Types\UuidType;
use Symfony\Component\Uid\Uuid;
#[ORM\Entity]
class Test
{
#[ORM\Id]
#[ORM\Column(type: UuidType::NAME, unique: true)]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\CustomIdGenerator(class: UuidGenerator::class)]
private ?Uuid $uuid;
public function getUuid(): ?Uuid
{
return $this->uuid;
}
}
However it yields:
Property App\Entity\Test::$uuid: Doctrine type "uuid" does not have any registered descriptor.
🪪 doctrine.descriptorNotFound
I see descriptor support for ramsey/uuid, but how can I make it understand the symfony/uid type descriptor?