• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

valkyrjaio / valkyrja-php / 30726116251
100%

Build:
DEFAULT BRANCH: 26.x
Ran 02 Aug 2026 12:57AM UTC
Jobs 1
Files 1217
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Aug 2026 12:55AM UTC coverage: 100.0%. Remained the same
30726116251

push

github

web-flow
[Orm] refactor(#1019)!: Restore the ORM date stamping through the metadata registry (#1090)

# Description

The ORM stamps a date on an entity again, and the entity holds no static
date
method.

Commit `d3cc39be2` deleted `Persister`, and the date stamping went with
it.
`Repository` replaced `Persister` from the query side, and `Repository`
never got
the two hooks that ran before a persist. #1019 records the
investigation: the
loss is accidental, because the commit kept the whole entity surface and
removed
each intentional target in full.

Two defects exist on `26.x` today:

- `Repository::delete()` runs a hard `DELETE` for every entity, and it
does not
test for `SoftDeleteEntityContract`. A caller that soft deletes a row
destroys
  the row.
- `Repository::create()` builds the `INSERT` from `asStorableArray()`,
which
  reads `get_object_vars($this)`. `DatedFields::$date_created` and
`$date_modified` are typed `string` with no default value, so PHP leaves
them
uninitialized and `get_object_vars()` omits them. A new `DatedEntity`
therefore
  returns `['id' => 1]`, and the `INSERT` carries no date column at all.

This pull request restores the stamping in `Repository`, and it moves
the date
metadata to the registry that valkyrjaio/valkyrja-php#1088 adds.

## Why the repository, and not a middleware or a listener

`Repository` is the only class that knows the persist verb. The date to
write
depends on whether the next statement is an `INSERT`, an `UPDATE` or a
`DELETE`.
`Persister` was the same seam under an older name.

A middleware does not fit, because the ORM has no persist middleware
pipeline.
`Orm\Middleware\EntityRouteMatchedMiddleware` is HTTP route middleware,
and it is
unrelated. A listener does not fit either, because a listener makes the
stamp
optional and dependent on the order of the listeners. A create that runs
without
a created date writes a bad row.

## Why one pull request, and not two

`AGENTS.md` §4 ("What a data object holds") forbid... (continued)

63 of 0 new or added lines in 0 files covered. (NaN%)

12914 of 12914 relevant lines covered (100.0%)

24.45 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30726116251.1 02 Aug 2026 12:57AM UTC 1217
100.0
GitHub Action Run
Source Files on build 30726116251
  • Tree
  • List 1217
  • Changed 9
  • Source Changed 9
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30726116251
  • 3afc6e27 on github
  • Prev Build on 26.x (#30725319396)
  • Next Build on 26.x (#30726559438)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc