Promote DateTime property type to NeoWiki core#805
Conversation
> Result of back-and-forth with @malberts. > Context: the NeoWiki codebase, the existing built-in property types > (Text/Url/Number/Select/Relation), and the in-tree RedHerb test extension > where DateTime previously lived. > <sub>Written by Claude Code, `Opus 4.7 (1M context)`</sub> Move the `dateTime` PropertyType backend from the RedHerb test extension into NeoWiki core, alongside the other built-in types. The frontend already lived in NeoWiki, so this completes the migration. - `DateTimeType` and `DateTimeProperty` move to `src/Domain/PropertyType/Types/` and `src/Domain/Schema/Property/`. - Registered via `PropertyTypeRegistry::withCoreTypes()` and `Neo4jValueBuilderRegistry::withCoreBuilders()`, using the shared `$toScalars` builder — matching what RedHerb did. - RedHerb keeps Color as the canonical extension-point example. - The two RedHerb-specific DateTime assertions in `NeoWikiRegistrationHookTest` are dropped; equivalent core coverage is added via the moved `DateTimePropertyTest`, a new `DateTimeTypeTest`, and an extra `hasBuilder( 'dateTime' )` assertion in `Neo4jValueBuilderRegistryTest`. No behaviour changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reviewed the diff against the surrounding code. No blockers — the move is mechanically correct, behaviour-preserving ( A couple of minor test-shape items worth tracking, both introduced by this PR:
Optional follow-up (not specific to this PR): |
The prior version had four methods, but the equivalent assertions either duplicated DateTimePropertyTest (buildPropertyDefinitionFromJson coverage, property type name) or were inconsistent with sibling type tests (NumberTypeTest, UrlTypeTest, etc.) which only assert getDisplayAttributeNames(). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Move the
dateTimePropertyType backend from the RedHerb test extension intoNeoWiki core, alongside the other built-in types. The frontend already lived
in NeoWiki, so this completes the migration.
DateTimeTypeandDateTimePropertymove tosrc/Domain/PropertyType/Types/and
src/Domain/Schema/Property/.PropertyTypeRegistry::withCoreTypes()andNeo4jValueBuilderRegistry::withCoreBuilders(), using the shared$toScalarsbuilder — matching what RedHerb did.
NeoWikiRegistrationHookTestare dropped; equivalent core coverage is added via the moved
DateTimePropertyTest, a newDateTimeTypeTest, and an extrahasBuilder( 'dateTime' )assertion inNeo4jValueBuilderRegistryTest.No behaviour changes.