website/errors/doctrine.descriptorNotFound.md
<?php declare(strict_types = 1);
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity]
class User
{
#[ORM\Column(type: 'custom_type')]
private string $name;
}
This error is reported by the phpstan-doctrine extension.
The Doctrine column mapping uses a type (custom_type) that does not have a registered type descriptor. PHPStan cannot validate the type mapping for this column because the type descriptor is missing from the descriptor registry.
Register the custom Doctrine type in your configuration, or use a built-in Doctrine type:
<?php declare(strict_types = 1);
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity]
class User
{
- #[ORM\Column(type: 'custom_type')]
+ #[ORM\Column(type: 'string')]
private string $name;
}
If using a custom type, make sure it is properly registered with Doctrine's type system and configure the phpstan-doctrine extension to recognise it.