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

Unify system variable $basePath #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mildabre
Copy link

@mildabre mildabre commented Dec 3, 2024

There is a bug in implementation of system variable $basePath in Nette + Latte. The variable is created in UrlScript::getBasePath() with ending slash. But in Latte/MicroPresenter is used WITHOUT this ending slash - this is tricky. The purpose of this PR is unify $basePath in all nette packages to have everywere identical value.

Variable $basePath is used in 3 nette packages in 5 classes:

nette/application

  • MicroPresenter
  • TemplateFactory

nette/routing

  • Route
  • RouteList

nette/http

  • UrlScript

there are 3 separate PR for every package, to be merger all together:

#18
nette/http#242
nette/application#341

I will also publish on forum nette more deep explanation of this RFC.

This PR is a BC break, but the existing "dichotomy" between value in Latte and UrlScript is much worse. Therefore, I recommend unify the value of $basePath regardless of the BC break.

…ormalization of this method and removing ending slash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant