Skip to content

Add a redirect route shortcut#2425

Merged
akrabat merged 2 commits into
slimphp:4.xfrom
ellotheth:redirect-route
Apr 19, 2018
Merged

Add a redirect route shortcut#2425
akrabat merged 2 commits into
slimphp:4.xfrom
ellotheth:redirect-route

Conversation

@ellotheth

Copy link
Copy Markdown
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

coveralls commented Apr 13, 2018

Copy link
Copy Markdown

Coverage Status

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

@akrabat akrabat left a comment

Copy link
Copy Markdown
Member

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

akrabat commented Apr 14, 2018

Copy link
Copy Markdown
Member

(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
Copy Markdown
Contributor Author

@akrabat Righto, done!

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

akrabat commented Apr 15, 2018

Copy link
Copy Markdown
Member

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

@ellotheth

Copy link
Copy Markdown
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
chriscct7 pushed a commit to awesomemotive/aioseo-slim-v3-php-8.1 that referenced this pull request Sep 3, 2025
chriscct7 pushed a commit to awesomemotive/aioseo-slim-v3-php-8.1 that referenced this pull request Sep 3, 2025
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