Skip to content

Conversation

MatTheCat
Copy link
Contributor

@MatTheCat MatTheCat commented Aug 21, 2025

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #53873
License MIT

The user impersonation documentation just mentions

control the redirection target route via target_route

Now, given that Twig’s impersonation_exit_path and impersonation_exit_url have an exitTo parameter but not impersonation_path nor impersonation_url, it looks like target_route should only be used when starting an impersonation. However it is currently also used when exiting, which means that if you configured one, an exitTo argument wouldn’t have any effect.

Based on this assumption, this PR ignores target_route when exiting impersonation.

Since exitTo will now work with target_route this PR technically breaks BC, but since this behavior was broken I’m not sure it needs to be considered.

@fabpot
Copy link
Member

fabpot commented Aug 22, 2025

Thank you @MatTheCat.

@fabpot fabpot merged commit a410ac7 into symfony:6.4 Aug 22, 2025
11 checks passed
@MatTheCat MatTheCat deleted the ticket_53873 branch August 22, 2025 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants