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

valkyrjaio / valkyrja-php / 38193946094
100%

Build:
DEFAULT BRANCH: 26.x
Ran 12 Oct 2026 02:00AM UTC
Jobs 1
Files 1277
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

12 Oct 2026 01:58AM UTC coverage: 100.0%. Remained the same
38193946094

push

github

web-flow
[Event] fix: Type the events map as a map of listener id to listener id (#1372)

# Description

`ListenerCollection` annotates `$events` as `array<class-string,
string[]>`, a list, while
`addListener` writes `$this->events[$eventId][$listenerId] =
$listenerId`, a map. The annotation
is wrong, and the code is right.

The listener id has to be the key. `addListener` is idempotent only
because it is, and
`removeListener` and `removeListenerById` both `unset` by it. Code
written against the annotation
would append to a list, which duplicates a listener on a second
registration and makes both
removals no-ops.

Neither PHPStan nor Psalm rejects `string[]`, because both read it as
`array<array-key, string>`, so the wrong annotation passes the gate. A
port read it and built a
list instead of a map, which is how the annotation reached a second
language.

## Types of changes

- [x] Improvement _(non-breaking change which improves code)_
- [ ] Bug fix _(non-breaking change which fixes an issue)_
- [ ] New feature _(non-breaking change which adds functionality)_
- [ ] Deprecation _(breaking change which removes functionality)_
- [ ] Breaking change _(fix or feature that would cause existing
functionality to change)_
- [ ] Documentation improvement

## Changes

- **`src/Valkyrja/Event/Collection/ListenerCollection.php`** — types the
events map as a map of
  listener id to listener id.
- **`src/Valkyrja/Event/Data/EventData.php`** — types the constructor's
events parameter the same
  way.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

13747 of 13747 relevant lines covered (100.0%)

26.89 hits per line

Jobs
ID Job ID Ran Files Coverage
1 38193946094.1 12 Oct 2026 02:00AM UTC 1277
100.0
GitHub Action Run
Source Files on build 38193946094
  • Tree
  • List 1277
  • Changed 2
  • Source Changed 2
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #38193946094
  • 81152670 on github
  • Prev Build on 26.x (#38192970604)
  • Next Build on 26.x (#38195085733)
  • 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