Skip to content

Remove use of deprecated security.exception_listener.class parameter #7898

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

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix from review
  • Loading branch information
ndench committed May 12, 2017
commit 9d71a18e94882342d564a4f834cfe70fe782443f
6 changes: 3 additions & 3 deletions security/target_path.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ the user is redirected back to a page which the browser cannot render.
To get around this behavior, you would simply need to extend the ``ExceptionListener``
class and override the default method named ``setTargetPath()``.

First, add a ``CompilerPass`` which you will use to override the ``ExceptionListener`` class::
First, add a compiler pass which you will use to replace the ``ExceptionListener`` class::

// src/AppBundle/AppBundle.php
namespace AppBundle;
Expand All @@ -33,7 +33,7 @@ First, add a ``CompilerPass`` which you will use to override the ``ExceptionList
}

Next, create the ``ExceptionListenerPass`` to replace the definition of ``ExceptionListener``.
Make sure you use the name of the firewall you have configured in ``app/config``::
Make sure you use the name of the firewall you have configured your security configuration::

// src/AppBundle/DependencyInjection/Compiler/ExceptionListenerPass.php
namespace AppBundle\DependencyInjection\Compiler;
Expand All @@ -48,7 +48,7 @@ Make sure you use the name of the firewall you have configured in ``app/config``
{
// Use the name of your firewall as suffix e.g. 'secured_area'
$definition = $container->getDefinition('security.exception_listener.secured_area');
$definition->setClass('AppBundle\Security\Firewall\ExceptionListener');
$definition->setClass(ExceptionListener::class);
}
}

Expand Down