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

Add basePath to Router Fixes #1440 #1443

Merged
merged 4 commits into from Aug 16, 2015
Merged

Add basePath to Router Fixes #1440 #1443

merged 4 commits into from Aug 16, 2015

Conversation

JoeBengalen
Copy link
Contributor

After some chatting with @akrabat about #1440 this is the result.
This should now work in combination with a base path:

$app->get('/books', function () {})->setName('books');

$app->get('/test', function ($request, $response, $args) {
    $uri = $request->getUri()->withPath($this->router->pathFor('books'));

    return $response->withRedirect($uri, 307);
});

Due to the request being called in the router creation process the tests
failed, because you cannot overwrite request once it had been created
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.

None yet

3 participants