This repository has been archived by the owner on Jan 21, 2020. It is now read-only.
Support generating default route w/o parameters #23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Given a matched route with name
album.index
and path/album[/page/{page:\d+}]
, invoking theUrlHelper
with the route namealbum.index
and no additional parameters while on page 5 would return/album/page/5
, since it automatically merges existing params from theRouteResult
. This behavior would make it impossible to use theUrlHelper
to generate the base/album
URL while on any page.Invoking the helper with the new third argument
$reuseResultParams
set tofalse
will now cause the helper to only take the params provided in the 2nd$params
argument into consideration, which will produce the base/album
URL in the above example.BC Breaks:
UrlHelper
is being consumed directly.UrlHelper
has been extended.This addresses #10 , but due to the BC break I've set the milestone to
3.0.0
. If this is 👍'ed, I'll likely gather any other potential BC breaking contributions and release them all at once as3.0.0
with the intention of bringing the helpers repo down to 0 open issues and 0 PRs.