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

valkyrjaio / valkyrja-php / 30724957233
100%

Build:
DEFAULT BRANCH: 26.x
Ran 02 Aug 2026 12:19AM UTC
Jobs 1
Files 1219
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:17AM UTC coverage: 100.0%. Remained the same
30724957233

push

github

web-flow
[Orm] feat(#1019): Add the entity metadata registry (#1088)

# Description

The ORM no longer stamps a date on an entity. `Persister` did the work,
and
commit `d3cc39be2` deleted `Persister`. `Repository` replaced it without
the
dated or the soft delete handling. #1019 records the investigation, and
the
finding is that the loss is accidental.

The restored stamping needs three values for an entity: the date format,
the
date created field and the date modified field. Each value is a static
method on
the entity today, and `AGENTS.md` §4 ("What a data object holds")
forbids a
static method on a data object. The section uses
`Dateable::getFormattedDate()`
as its example of the wrong shape, and valkyrjaio/ci-phpstan-php#162
reports
exactly that call. New code must not land in that state.

`STATIC_METHODS.md` prescribes the replacement: a metadata registry that
the
developer fills in a service provider, keyed by class token. This pull
request
adds that registry. It adds no consumer, so it changes no behavior. A
second
pull request makes `Repository` read the registry and stamp the dates.

`STATIC_METHODS.md` shows a two-key Java form,
`setSingleton(EntityMetadata.class, MyEntity.class, metadata)`. The PHP
container
keys a singleton by one service id, so PHP holds the map in one registry
service.
This is the pattern that the framework already uses for the routes: the
developer
provides the data objects, and the framework stores and reads them by
key.

The registry is immutable, so `withEntity()` returns a new registry:

```php
$registry = $container->getSingleton(EntityMetadataRegistryContract::class);

$container->setSingleton(
    EntityMetadataRegistryContract::class,
    $registry->withEntity(Post::class, new EntityMetadata(dated: new DatedMetadata())),
);
```

`get()` throws an `OrmUnregisteredEntityException` for an entity that
the
developer did not register. `STATIC_METHODS.md` requires an explicit
failure, and
not a silent fallback, because a default... (continued)

36 of 36 new or added lines in 5 files covered. (100.0%)

12887 of 12887 relevant lines covered (100.0%)

24.38 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30724957233.1 02 Aug 2026 12:19AM UTC 1219
100.0
GitHub Action Run
Source Files on build 30724957233
  • Tree
  • List 1219
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30724957233
  • 2e1e866d on github
  • Prev Build on 26.x (#30723771849)
  • Next Build on 26.x (#30725319396)
  • 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