Skip to content

Add RouteHelper, wrapping Laminas URL helper#5049

Merged
demiankatz merged 7 commits intovufind-org:devfrom
maccabeelevine:route-helper
Feb 5, 2026
Merged

Add RouteHelper, wrapping Laminas URL helper#5049
demiankatz merged 7 commits intovufind-org:devfrom
maccabeelevine:route-helper

Conversation

@maccabeelevine
Copy link
Member

For #4939, discussed here: https://github.com/vufind-org/vufind/pull/4939/changes#r2736633817

Wrap Laminas URL helper so it can be used outside of the view rendering context, specifically as part of an API implementation. Similar to #4983.

@maccabeelevine maccabeelevine marked this pull request as ready for review February 2, 2026 22:01
@maccabeelevine
Copy link
Member Author

GHA is down again so I'm not sure it builds, but I think it's worth a review anyway given the earlier discussion.

Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @maccabeelevine, this is off to a good start. See below for suggestions!

Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maccabeelevine, is there anything else pending on your end before we merge this?

As noted elsewhere, we may need to figure out how to handle the normalize_path option, which we have to switch off in some situations to prevent problems. However, I'm not sure that we need to expose that as an option. It may actually be better to just always turn the option off, unless we can find a scenario where leaving it on is important. (The reason we need to disable it in some scenarios is to prevent IDs with encoded slashes from getting decoded and causing problems; I'm not aware of any scenarios where we actually need it enabled -- though perhaps switching it off and running tests will reveal something I'm unaware of). I'm open to the idea of merging this as-is and starting to refactor so we can figure that out later -- worst case scenario, we add an optional $options (or more specific) parameter on the end of the signature here without changing the other work.

What do you think? I'm also interested in @EreMaijala's thoughts.

@EreMaijala
Copy link
Contributor

This looks good to me, but I think we should disable the normalize_path option here at least by default.

Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @EreMaijala's suggestion. What do you think of the below?

maccabeelevine and others added 2 commits February 5, 2026 12:49
Co-authored-by: Demian Katz <demian.katz@villanova.edu>
@maccabeelevine
Copy link
Member Author

Nothing else pending on my end.

Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks, @maccabeelevine!

@demiankatz demiankatz merged commit b68b6f7 into vufind-org:dev Feb 5, 2026
6 checks passed
@demiankatz demiankatz removed the request for review from EreMaijala February 5, 2026 19:08
@demiankatz demiankatz added this to the 11.1 milestone Feb 5, 2026
@demiankatz demiankatz added the architecture pull requests that involve significant refactoring / architectural changes label Feb 5, 2026
@maccabeelevine maccabeelevine deleted the route-helper branch February 5, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

architecture pull requests that involve significant refactoring / architectural changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments