Upstatement / Upstatement/routes
Make more (all?) AltoRouter options available
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 201
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
AltoRouter already provides optional parameters, but Timber doesn't support them because this router strips question marks. I would like to use optional parameters, and maybe it wouldn't be a bad idea to just provide access to the AltoRouter object?
Something like
Routes::getRouter()->addRoutes([
['GET','/users/[i:id?]', function($params) {
etc...
})
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Routes::getRouter() entry point and trace where AltoRouter route definitions are processed, especially how question marks are stripped. Check whether the router object can expose AltoRouter's addRoutes behavior for optional parameters. Done means an optional route such as /users/[i:id?] works and the requested router access is available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100