feat: add Colour and ElementColour liturgical colour value objects #203
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!203
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/11-colour"
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 #11.
Models liturgical colour as a per-edition attribute — never part of an observance's identity — under
src/Attribute/, alongsideRankClass/LegacyRank(#10).What lands
Colour— the closed traditional Roman colour set (white,red,green,violet,black,rose). GuardedfromString()+ named factories,value()/equals()/__toString(), andisViolet()/isRose()predicates. Constructed from edition attribute data, not parsed from an ID token.ElementColour— the colour borne by a single celebration element (the principal or one commemoration), so a day is not reduced to one colour:principaland eachcommemorationmay each wear a distinct colour. Rose is expressed as aroseAllowedflag on a violet base (ElementColour::violetWithRose()for Gaudete / Laetare), never stored as a base colour; invalid states (rose-allowed on a non-violet base) are unrepresentable.Acceptance criteria
roseAllowedexpressible as a flag on violetVerification
Local (portable toolchain):
composer lint20/20 ·composer analysePHPStan L6[OK]·composer test64/64 green.