Foundation & framework-free core#1
Merged
Merged
Conversation
AuditPage divided total by perPage with no guard, a reachable fatal via AuditQuery(perPage: 0). Validate page>=1 and perPage>=1 in AuditQuery (fail fast at the input boundary) and guard AuditPage's division directly. Adds boundary tests; AuditQuery now carries logic so it is covered here.
…dary ADR 0006: AuditChannel lives in Event because Record, Recording, and Reading all reference it and Event is their only common dependency. ADR 0008: data() has no redaction path and must never carry secrets.
- Library: composer.lock is no longer tracked (consumers resolve against their own lock); gitignore it. CI installs via 'composer update' since there is no committed lock to install from. - Bump actions/checkout v4 -> v5 (clears the Node 20 deprecation warning).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Builds the framework-free core of
wedevelopnl/audit-log(Plan 1): value objects, theAuditEventcontract, theRecorderand its ports, the immutableAuditRecordread contract, and the read DTOs — plus repo scaffold, QA tooling, GitHub Actions CI, and the governing ADRs. No Symfony/Doctrine; persistence and wiring follow in Plans 2–3.What's included
AuditChannel,Subject,FieldChange,Changeset,RenderLine,RenderPayload, theAuditEventcontract,AbstractAuditEvent,ProvidesSubjectLabel.Actor,Origin, the five ports (ActorResolver,OriginResolver,SubjectLabeller,IdentityGenerator,RecordStore),NewAuditRecord, theRecorderseam andDefaultRecorder.AuditRecord(immutable read contract with property hooks),AuditEntry,AuditActor,AuditQuery,AuditPage(page-count),RecordReader..gitattributes(clean Packagist dist), PHPStan (max + 100% type coverage), PHP CS Fixer, Rector, Deptrac, PHPUnit, Infection.Quality
cs-check,phpstan(level max),rector-check,deptrac(0 violations),test— all green.AuditEntry/AuditActor/AuditQuery) are intentionally exercised by Plan 2's reader.Notes / deviations from plan
return.unusedTypeat max).DefaultRecorderTestasserts non-null before->access instead of chained?->(phpstan-phpunit narrows the receiver after the first assertion).data()per-concrete-event@returnnarrowing convention (instead of generics on the interface) — seeUserDeletedEvent.