Validation protects the architectural boundary of the package. Invalid event definitions fail immediately instead of being coerced into a registry or silently ignored.
The concrete validator is StrictEventValidator.
A registrable event must be:
- a concrete class
- immutable
- assigned to exactly one supported event family
In practice, that means the class must implement exactly one of:
KernelStateEventInterfaceProcessEventInterface
Because both family interfaces extend ImmutableEventInterface, family membership carries the immutability requirement.
Validation fails when a candidate:
- implements only
EventInterface - implements only
ImmutableEventInterface - implements neither family interface
- implements both family interfaces
- is abstract
- is an interface
- is a trait
- is an enum
Reflection-based validation also fails if the class cannot be reflected.
There is no fallback path. Invalid definitions raise EventClassificationException.
The same hard-fail approach applies after validation:
- duplicate registrations fail
- family mismatches fail
- locked registries reject new registrations
Related: