Skip to content
docsv0.24.0

FieldSpec

A single field parsed from the `--fields` DSL: its PHP type, Doctrine column type, nullability, and any modifiers (length / precision+scale) or relation-enum target. Consumed by the generators to emit properties, columns and accessors.

FieldSpec::__construct()

public function __construct(string $name, string $kind, string $phpType, string $columnType, bool $nullable = false, array $modifiers = [], ?string $target = null, array $cases = []):

Parameters

Parameters of __construct()
NameTypeDescription
$namestring
$kind('scalar' | 'enum' | 'belongsTo')
$phpTypestring
$columnTypestring
$nullablebool
$modifiersarray<string, int>
$target?string
$caseslist<string>enum case names, when the field declares them (`enum:Class(a,b,c)`) — the enum is generated from these; empty means the enum is referenced, not made