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

valkyrjaio / valkyrja-java / 30322446063
100%

Build:
DEFAULT BRANCH: 26.x
Ran 28 Jul 2026 02:13AM UTC
Jobs 1
Files 653
Run time 1min
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

28 Jul 2026 02:12AM UTC coverage: 99.977%. Remained the same
30322446063

push

github

web-flow
[Http] Load routes from the generated routing data outside debug mode (#52)

# Description

The HTTP route collection never loaded the generated routing data, so an
application
running outside debug mode booted with **zero routes and answered every
request with a
404** — including the starter application's welcome route.

`publishRouteCollection` had two problems:

1. It never called `RouteCollection#setFromData`. That method (and
`RouteCollectionContract#setFromData`) existed but had no caller
anywhere in the
   framework, so the generated `AppHttpRoutingData` was never consulted.
2. It gated attribute route collection on
`container.isSingleton(RouteCollectorContract.class)`.
`Container#setFromData`
registers the generated entries as deferred **callbacks**, not
singletons, so
`isSingleton` is always `false` at that point and the collector branch
never ran
   either. PHP has no such guard.

Net effect: neither route source was ever used outside debug mode.

This ports the PHP reference implementation
(`Valkyrja\Http\Routing\Provider\HttpRoutingServiceProvider`)
faithfully:

- **Debug mode** collects the routes from the application's HTTP route
providers and
  their controllers' annotations on every boot.
- **Outside debug mode** the routes are loaded from the generated
routing data, whose
handlers are direct method references and therefore need no controller
reflection.
This matters: the attribute collector instantiates a controller through
its no-arg
constructor, which fails for any controller with dependencies, whereas
the generated
  data resolves the controller from the container.

The collection logic is split into `publishData`, which is also
registered as the
`HttpRoutingDataContract` publisher — mirroring PHP — so an application
that ships no
generated routing data still resolves a fully collected data set on
demand.

Verified end to end against the starter application: `GET /` now returns
`200 Welcome!`, `/version` returns `1.0.0`, `/json` re... (continued)

1870 of 1872 branches covered (99.89%)

Branch coverage included in aggregate %.

11 of 11 new or added lines in 1 file covered. (100.0%)

6808 of 6808 relevant lines covered (100.0%)

4.34 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30322446063.1 28 Jul 2026 02:13AM UTC 653
99.98
GitHub Action Run
Source Files on build 30322446063
  • Tree
  • List 653
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #30322446063
  • cb041b92 on github
  • Prev Build on 26.x (#30236270400)
  • Next Build on 26.x (#30322506389)
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