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

valkyrjaio / ci-phparkitect-php / 30720982539
100%

Build:
DEFAULT BRANCH: 26.x
Ran 01 Aug 2026 10:18PM UTC
Jobs 1
Files 4
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

01 Aug 2026 10:18PM UTC coverage: 100.0%. Remained the same
30720982539

push

github

web-flow
[Provider] feat: Add a rule that a provider name contains its component (#166)

# Description

This change adds an architecture rule. A provider class must carry the
name of the component that it
belongs to.

The rule closes a gap that a real defect exposed. The file
`src/Valkyrja/Session/Provider/SmsServiceProvider.php` in the framework
declared
`namespace Valkyrja\Session\Provider;` and `class SmsServiceProvider`.
The class registered Session
services only, but it carried the Sms component's name. PHPArkitect
passed the file. The existing
rules check the `*ServiceProvider` name suffix and the `Provider\`
segment, and neither one checks
the component name. valkyrjaio/valkyrja-php#1005 renamed the class. This
change stops the next one.

The recursive uniqueness rule in `AGENTS.md` §4 exists because the
generated data-cache file
references providers from many components at the same time. Two
providers with the same name collide
in that file. A wrong component name is therefore a correctness risk,
not a style preference.

## The new expression

`HaveNameContainingComponent` reads the component from the class
namespace, so a static pattern
cannot express it. A namespace takes the form
`Root\Component\...\Segment`, so the component is the
second segment. A namespace of two segments has no component segment, so
the root names the
component. `Sindri\Provider\SindriComponentProvider` therefore takes
`Sindri`.

The expression tests for a substring, not for a prefix. A prefix test
gives a false positive on three
shapes that are correct today:

| Class | Component | Result |
|-------|-----------|--------|
| `Valkyrja\Application\Provider\CliApplicationComponentProvider` |
`Application` | passes — a protocol qualifier comes first |
| `Valkyrja\Http\Routing\Provider\HttpRoutingHttpRoutesProvider` |
`Http` | passes — a sub-component follows |
| `Sindri\Provider\SindriComponentProvider` | `Sindri` | passes — the
root names the component |
| `Valkyrja\Session\Provid... (continued)

31 of 31 new or added lines in 2 files covered. (100.0%)

319 of 319 relevant lines covered (100.0%)

1.33 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30720982539.1 01 Aug 2026 10:18PM UTC 4
100.0
GitHub Action Run
Source Files on build 30720982539
  • Tree
  • List 4
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30720982539
  • d466cf97 on github
  • Prev Build on 26.x (#30718517941)
  • Next Build on 26.x (#30721229350)
  • 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