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

valkyrjaio / valkyrja-php / 24947444456 / 1
100%
26.x: 100%

Build:
DEFAULT BRANCH: 26.x
Ran 26 Apr 2026 03:40AM UTC
Files 1140
Run time 22s
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

26 Apr 2026 03:38AM UTC coverage: 99.792%. Remained the same
24947444456.1

push

github

web-flow
[Cli] Add RouteContract as second parameter to route handler callable (#782)

# Description

Adds `RouteContract` as a second parameter to the CLI route handler
callable signature, giving handlers direct access to the matched and
dispatched route (including its parsed arguments and options).

Previously, handlers only received the container:

```php
callable(ContainerContract): OutputContract
```

Now they also receive the dispatched route:

```php
callable(ContainerContract, RouteContract): OutputContract
```

The router's `dispatchRoute()` method now passes the post-middleware
route instance alongside the container when invoking the handler. All
existing handlers and tests have been updated to match the new
signature.

---

## Types of Changes

- [ ] 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)_
- [x] Breaking change _(fix or feature that would cause existing
functionality to change)_
- [ ] Documentation improvement

---

## Changes

- **`Cli/Routing/Data/Contract/RouteContract.php`** — updated
`getHandler()` return type and `withHandler()` parameter type to
`callable(ContainerContract, self): OutputContract`
- **`Cli/Routing/Data/Route.php`** — updated `$handler` property type
annotation to match new callable signature
- **`Cli/Routing/Attribute/Route.php`** — updated handler docblock type
and default handler closure to accept `RouteContract`
- **`Cli/Routing/Dispatcher/Router.php`** — passes
`$routeAfterMiddleware` as second argument when invoking the handler
- **`Cli/Routing/Provider/CliRoutingCliRouteProvider.php`** — updated
all four handler signatures to accept `RouteContract $route`
- **`Http/Routing/Provider/HttpRoutingCliRouteProvider.php`** — updated
`listHandler` signature to accept `RouteContract $route`
- **`tests/.../Command/CommandClass... (continued)

12467 of 12493 relevant lines covered (99.79%)

15.83 hits per line

Source Files on job 24947444456.1
  • Tree
  • List 1140
  • Changed 7
  • Source Changed 7
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 24947444456
  • aef033cd on github
  • Prev Job for on 26.x (#24926358529.1)
  • Next Job for on 26.x (#25023257271.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc