Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for dot notation in route key normalization #1240

Closed
caendesilva opened this issue Mar 8, 2023 · 1 comment · Fixed by #1241 or #1244
Closed

Remove support for dot notation in route key normalization #1240

caendesilva opened this issue Mar 8, 2023 · 1 comment · Fixed by #1241 or #1244

Comments

@caendesilva
Copy link
Member

caendesilva commented Mar 8, 2023

Currently periods are rewritten to slashes when accessing route keys, this is so that dot notation can be used, which provides familiarity to those coming from Laravel where that's the convention for route names.

However, this leads to severe issues when there are actually periods in the URL. For example: http://localhost:8080/docs/1.x/index.html would be parsed as http://localhost:8080/docs/1/x/index.html which results in Route [docs/1/x/index] not found.

This then begs the question if we should support normalizing route keys to support dot notation at all, especially since I think it's a fairly common use case to use HydePHP for documentation sites, which are often versioned like this. Furthermore, periods are allowed in URLs.

It also adds complexity to have multiple route key namings, and since route keys are directly tied to the URL routes I think it makes more sense to only use that format.

See #1239

@caendesilva
Copy link
Member Author

This is basically a side effect of not having manually named routes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant