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 a redirect route shortcut #2425

Merged
merged 2 commits into from
Apr 19, 2018
Merged

Add a redirect route shortcut #2425

merged 2 commits into from
Apr 19, 2018

Conversation

ellotheth
Copy link
Contributor

Per a short conversation with @akrabat.

(I'm blanket overwriting whatever status code the ResponseInterface has because I wasn't sure the flexibility in e.g. Slim\Http\Response::withRedirect is necessary at this level, but maybe it's worth keeping the behavior the same for consistency?)

@coveralls
Copy link

coveralls commented Apr 13, 2018

Coverage Status

Coverage increased (+0.02%) to 96.075% when pulling 5a321f2 on ellotheth:redirect-route into f2c4674 on slimphp:4.x.

Copy link
Member

@akrabat akrabat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ellotheth!

Please add a test that ensures that UriInterface as $destination also works.

@akrabat
Copy link
Member

akrabat commented Apr 14, 2018

(I'm blanket overwriting whatever status code the ResponseInterface has because I wasn't sure the flexibility in e.g. Slim\Http\Response::withRedirect is necessary at this level, but maybe it's worth keeping the behavior the same for consistency?)

This is correct. You should only change the response object on the way back anyway.

@akrabat akrabat added this to the 3.10.0 milestone Apr 14, 2018
@ellotheth
Copy link
Contributor Author

@akrabat Righto, done!

@akrabat akrabat modified the milestones: 3.10.0, 4.0 Apr 15, 2018
@akrabat
Copy link
Member

akrabat commented Apr 15, 2018

Can you also do this against the 3.x branch?

@ellotheth
Copy link
Contributor Author

Yup, and I'll add the docs. Should be be done by tomorrow night.

@akrabat akrabat merged commit 5a321f2 into slimphp:4.x Apr 19, 2018
akrabat added a commit that referenced this pull request Apr 19, 2018
akrabat added a commit that referenced this pull request Apr 19, 2018
@ellotheth ellotheth deleted the redirect-route branch April 19, 2018 19:41
@l0gicgate l0gicgate mentioned this pull request Apr 25, 2019
@l0gicgate l0gicgate mentioned this pull request Aug 1, 2019
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 this pull request may close these issues.

3 participants