Skip to content
docsv0.24.0

DoctrineAvailability

Guards the ENTITY path's optional dependency on `doctrine/orm` (see `composer.json`'s `suggest` — it is deliberately NOT a hard `require`; the CONTROLLER path has zero Doctrine dependency, runtime or legacy, and must stay that way). `EntityGenerator` and `EntityVerifier` both check this before doing anything else so a host that scaffolds/verifies an entity without `doctrine/orm` installed gets one clear, actionable failure instead of a confusing crash deep inside attribute reflection.

DoctrineAvailability::isAvailable()

public static function isAvailable(): bool

Whether `doctrine/orm`'s mapping attribute classes are loadable. A real `class_exists()` check (not a `composer.json` inspection) so it reflects what will actually happen when the generated/ verified code runs, regardless of how it got there.