Friday 22 March 2013

session's _security.target_path when upgrading to symfony2.1

One thing to watch out for when upgrading symfony2.0 to symfony2.1 is that if you make use of session's _security.target_path for redirections then you need to change it to have the name of the firewall you are referencing. So, if the name of your firewall is "default" then as of symfony 2.1 you need to instead use _security.default.target_path

So,
Symfony2.0:
$session->get('_security.target_path');

Symfony2.1:
$session->get('_security.name_of_the_firewall.target_path');

No comments:

Post a Comment

Pages