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

[5.x]: Allow HandlesInvalidState to return an instance of RedirectResponse #340

Conversation

Philrobots
Copy link
Contributor

@Philrobots Philrobots commented Mar 8, 2024

In certain cases, it would be great if the HandlesInvalidState class could also return a RedirectResponse object.

Much simpler when you want to redirect in case of error Invalid State exception

@joelbutcher

@Philrobots Philrobots changed the title [Feat]: Add redirectResponse type to HandlesInvalidState Contracts method [Feat]: Add RedirectResponse type to HandlesInvalidState Contracts method Mar 8, 2024
@joelbutcher
Copy link
Owner

@Philrobots It might be better to just allow the base response class from Symfony.

@joelbutcher
Copy link
Owner

Hmm, on second thoughts, I'll stick with it like this. Don't want json or file responses returned

@joelbutcher joelbutcher changed the title [Feat]: Add RedirectResponse type to HandlesInvalidState Contracts method [5.x]: Allow HandlesInvalidState to return an instance of RedirectResponse Mar 8, 2024
@joelbutcher joelbutcher merged commit 7ffeea9 into joelbutcher:5.x Mar 8, 2024
62 checks passed
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.

2 participants