feat: add LiturgicalDay aggregate and day() entry point #205
No reviewers
Labels
No labels
area: build
area: ci
area: compare
area: data
area: engine
area: model
area: provenance
area: rite
area: validation
backport
blocked
breaking
confirmed
dependencies
duplicate
epic
github_actions
invalid
needs-info
needs-triage
php
priority: high
priority: low
priority: medium
regression
type: bug
type: chore
type: correction
type: docs
type: enhancement
type: feature
type: fix
type: perf
type: refactor
type: security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Directorium/Core!205
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/13-liturgical-day"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #13. Completes Epic #6 (Package scaffold & engine foundations).
Establishes the public contract seam:
day($date)returns an immutableLiturgicalDay. This is the entry point the resolver phases will populate — it exists now, with a stable shape, so the rest of the engine (and downstream repos) can build against it.What lands
Introibo\Core\day(DateTimeImmutable $date): LiturgicalDay— the headline entry point, a namespaced function (files autoload). Takes aDateTimeImmutableso the returned day can't be mutated out from under the caller. Until the resolver phases are wired in, it returns an empty placeholder day.Introibo\Core\Calendar\LiturgicalDay— the immutable aggregate. Holds the day'sdate()plus four roles aslist<Observance>:celebration()— the office(s) actually celebrated (normally one principal)commemoration()— offices commemorated within another officedisplaced()— offices impeded on this day (transferred away or omitted)tempora()— the temporal office(s): the Sunday or feria of the seasonLiturgicalDay::placeholder($date)is the well-defined empty day;isEmpty()reports it. Immutable once built — it stores only value objects and hands back copied arrays, so a returned collection cannot mutate the aggregate.Acceptance criteria
day()accepts a date and returns aLiturgicalDaywith the four arraysplaceholder(),isEmpty())Per the issue note, this is the contract seam only; the output-contract epic (#52) formalises serialisation and the resolver epics populate the roles.
Verification
Local (portable toolchain):
composer validateOK ·composer lint26/26 ·composer analysePHPStan L6[OK]·composer test89/89 green.