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

valkyrjaio / valkyrja-php / 30593714907
100%

Build:
DEFAULT BRANCH: 26.x
Ran 31 Jul 2026 12:32AM UTC
Jobs 1
Files 1138
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

31 Jul 2026 12:30AM UTC coverage: 100.0%. Remained the same
30593714907

push

github

web-flow
[Application] fix!: Require the config in the application kernel (#969)

# Description

The application kernel accepted a defaulted config:

```
config = new Config()
```

That default is wrong on its own terms. A config is not optional — an
application that reaches the kernel without one
is misconfigured, and it should fail loudly rather than silently boot on
the framework's defaults with the wrong
providers, the wrong namespace, the wrong data path, and `debugMode`
off. Requiring the argument turns a silent
misconfiguration into a compile-time (or constructor-time) error.

No caller in `src` or in the tests relied on the default. Every call
site already passed a config explicitly, so this
tightens the contract without changing any behavior that is actually
exercised.

## Why now

It surfaced while measuring module loading in the TypeScript port. In
TypeScript the default is not merely wrong, it is
expensive: naming `Config` in a default parameter forces an
unconditional static `import`, and `Config` names
`ApplicationComponentProvider`, which names
`ContainerComponentProvider`. So a cached application that wants none of
that loaded it anyway, purely because a default it never used mentioned
the class.

PHP and Java do not pay that cost — `use` is a compile-time alias and
the JVM resolves constant-pool entries lazily —
but the defect is the same defect in all three, so it is fixed in all
three in one batch.

Measured on the TypeScript starter application, a cached HTTP boot
serving `GET /version`:

| | modules loaded | component providers loaded |
|---|---|---|
| before | 183 | 9 |
| after, with a standalone cached config | 142 | 0 |

`Go` has no equivalent — its kernel does not reference `Config` at all.
Python and Kotlin do not exist yet.

## Breaking change

This changes a public constructor signature. Any external caller that
omitted the config must now pass one:

```
new Valkyrja(container)          // no longer compiles
new Valkyrja(container, ... (continued)

12596 of 12596 relevant lines covered (100.0%)

23.75 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30593714907.1 31 Jul 2026 12:32AM UTC 1138
100.0
GitHub Action Run
Source Files on build 30593714907
  • Tree
  • List 1138
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30593714907
  • 2c0afe1f on github
  • Prev Build on 26.x (#30516899558)
  • Next Build on 26.x (#30613137948)
  • 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