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

4.x - Inconsistent setBasePath Behavior #2842

Closed
l0gicgate opened this issue Sep 23, 2019 · 1 comment · Fixed by #2844
Closed

4.x - Inconsistent setBasePath Behavior #2842

l0gicgate opened this issue Sep 23, 2019 · 1 comment · Fixed by #2844
Labels

Comments

@l0gicgate
Copy link
Member

  • When using $app->setBasePath('/public') it breaks RouteParser::relativeUrlFor output:

    echo $routerParser->urlFor('about');
    /public/about
    
    echo $routerParser->relativeUrlFor('about');
    about <- expected
    /public/about <- result
    
  • Using only $app->getRouteCollector()->setBasePath('/public'), RouteParser produces corrent urls for both urlFor and relativeUrlFor methods but breaks current path detection

  • Using both $app->setBasePath and $routeCollector->setBasePath produces invalid url paths for all methods

Originally posted by @piotr-cz in #2512 (comment)

@piotr-cz
Copy link
Contributor

piotr-cz commented Sep 23, 2019

I have prepared test case here: Slim-4-basepath-issue

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

Successfully merging a pull request may close this issue.

2 participants