Skip to content
docsv0.1.0

EntityVerifier

Verifies a class follows the Milpa host-app Doctrine entity convention: `#[ORM\Entity]` (+ `#[ORM\Table]`), an `#[ORM\Id]`/`#[ORM\GeneratedValue]` identity, private-only properties, typed `#[ORM\Column]`s with nullable coherence between the column and the PHP type, initialized to-many collections, an `#[ORM\PreUpdate]` + `#[ORM\HasLifecycleCallbacks]` pair when `updatedAt` is present, and that Doctrine's no-constructor hydration path actually works (nullable properties readable right after `newInstanceWithoutConstructor()`). This is a real runtime dependency on `doctrine/orm` (see composer.json) — Doctrine is the ORM convention every Milpa host app's generated entities target, exactly like `ControllerVerifier` targets the host's `BaseController`. Ported 1:1 from `scripts/verify-entity.php` (reflection checks only; CLI arg parsing/formatting lives in the thin shim).

EntityVerifier::verify()

public function verify(string $fqcn): Milpa\DevTools\Verify\VerificationResult

Reflects `$fqcn` and checks it against the host-app Doctrine entity convention described above.

Parameters

Parameters of verify()
NameTypeDescription
$fqcnstring