You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P3] Model host placeholders as route parameters and clarify URL generation #4
Symfony route matching returns both path placeholders and host placeholders as application route parameters. SymfonyRouter intentionally keeps every non-internal matcher value, so a route such as {tenant}.api.example.test/reports/{reportId} currently produces:
Both values are then available to request hydration and override query/body values. This is useful behavior, but the public name pathParameters incorrectly implies that every value originates in the URI path.
URL generation has a related intentional invariant: Router::generate() returns an origin-less reference such as /reports/42; scheme and host are removed even for host-constrained routes.
Proposed direction
Before a stable release, model these values as route parameters rather than path parameters. Prefer renaming the public property to routeParameters; if compatibility must be preserved, provide a documented migration or deprecation path.
Acceptance criteria
Host and path placeholders remain hydratable route parameters.
The public model no longer mislabels host-derived values as path-only values.
Tests cover a route with both a host placeholder and path placeholder.
Hydration precedence for route parameters over query and body is documented.
The origin-less return contract of Router::generate() is documented and tested for host- and scheme-constrained routes.
Activity
Merge issue #4 route parameter model