Skip to content

Conversation

@Blacksmoke16
Copy link
Member

Context

This PR changes the type used to represent a route's default values and parameters returned when a route is matched. The new return type is able to store any value, not just String?. This ultimately makes things a bit more flexible as more advanced info can be stored to power other downstream features.

While the API is very similar, still marking this as a breaking change as some type restrictions may need updated depending on how they were used.


Before merging, remember to add the athena-framework/athena prefix to the PR number in the PR title

@Blacksmoke16 Blacksmoke16 added component:routing kind:enhancement New functionality to an existing feature breaking labels Jan 2, 2026
@codecov
Copy link

codecov bot commented Jan 2, 2026

Codecov Report

❌ Patch coverage is 98.48485% with 8 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/components/routing/src/parameters.cr 92.30% 4 Missing ⚠️
src/components/framework/src/listeners/routing.cr 66.66% 1 Missing ⚠️
...rc/components/routing/spec/routing_handler_spec.cr 85.71% 1 Missing ⚠️
.../components/routing/src/generator/url_generator.cr 75.00% 1 Missing ⚠️
src/components/routing/src/route.cr 93.75% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (98.48%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage.

Components Coverage Δ
clock 100.00% <ø> (ø)
console 97.21% <ø> (ø)
dependency_injection 92.04% <ø> (ø)
dotenv 98.41% <ø> (ø)
event_dispatcher 95.90% <ø> (ø)
framework 97.22% <85.71%> (-0.03%) ⬇️
http 98.94% <ø> (ø)
image_size 96.63% <ø> (ø)
mercure 94.94% <ø> (ø)
mime 99.37% <ø> (ø)
negotiation 97.93% <ø> (ø)
routing 98.36% <98.65%> (-0.03%) ⬇️
serializer 95.86% <ø> (ø)
spec 94.06% <ø> (ø)
validator 95.85% <ø> (ø)

📢 Thoughts on this report? Let us know!

@Blacksmoke16 Blacksmoke16 merged commit 259d33f into master Jan 2, 2026
15 of 16 checks passed
@Blacksmoke16 Blacksmoke16 deleted the route-parameters branch January 2, 2026 23:19
PallasAthenaie pushed a commit to athena-framework/framework that referenced this pull request Jan 2, 2026
… to `ART::Parameters` (athena-framework/athena#652)

## Context

This PR changes the type used to represent a route's default values and
parameters returned when a route is matched. The new return type is able
to store any value, not just `String?`. This ultimately makes things a
bit more flexible as more advanced info can be stored to power other
downstream features.

While the API is very similar, still marking this as a breaking change
as some type restrictions may need updated depending on how they were
used.
PallasAthenaie pushed a commit to athena-framework/routing that referenced this pull request Jan 2, 2026
… to `ART::Parameters` (athena-framework/athena#652)

## Context

This PR changes the type used to represent a route's default values and
parameters returned when a route is matched. The new return type is able
to store any value, not just `String?`. This ultimately makes things a
bit more flexible as more advanced info can be stored to power other
downstream features.

While the API is very similar, still marking this as a breaking change
as some type restrictions may need updated depending on how they were
used.
Blacksmoke16 added a commit that referenced this pull request Jan 3, 2026
## Context

Follow up to #636 that
makes use of #652 to
store the `_action` directly within the route defaults. This removes the
needs for an extra mapping layer from controller name to `ATH::Action`.
I kept `_controller` as a means to more easily tell what controller
action handled the request.

## Changelog

- Refactor how the `ATH::Action` for a given request is resolved
- Expose `ATH::ActionResolver` and interface
PallasAthenaie pushed a commit to athena-framework/framework that referenced this pull request Jan 3, 2026
…a-framework/athena#653)

## Context

Follow up to athena-framework/athena#636 that
makes use of athena-framework/athena#652 to
store the `_action` directly within the route defaults. This removes the
needs for an extra mapping layer from controller name to `ATH::Action`.
I kept `_controller` as a means to more easily tell what controller
action handled the request.

## Changelog

- Refactor how the `ATH::Action` for a given request is resolved
- Expose `ATH::ActionResolver` and interface
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking component:routing kind:enhancement New functionality to an existing feature

Development

Successfully merging this pull request may close these issues.

2 participants