Skip to content

Add a deprecation note about CsrfProviderInterface #12642

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 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class CsrfProviderAdapter implements CsrfTokenManagerInterface

public function __construct(CsrfProviderInterface $csrfProvider)
{
trigger_error('\Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderAdapter was deprecated in version 2.4 and will be removed in version 3.0. Please use \Symfony\Component\Security\Csrf\CsrfTokenManager instead.', E_USER_DEPRECATED);

$this->csrfProvider = $csrfProvider;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider;

trigger_error('\Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface was deprecated in version 2.4 and will be removed in version 3.0. Please use \Symfony\Component\Security\Csrf\CsrfTokenManagerInterface instead.', E_USER_DEPRECATED);

/**
* Marks classes able to provide CSRF protection
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class CsrfTokenManagerAdapter implements CsrfProviderInterface

public function __construct(CsrfTokenManagerInterface $tokenManager)
{
trigger_error('\Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfTokenManagerAdapter was deprecated in version 2.4 and will be removed in version 3.0. Please use \Symfony\Component\Security\Csrf\CsrfTokenManager instead.', E_USER_DEPRECATED);

$this->tokenManager = $tokenManager;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class DefaultCsrfProvider implements CsrfProviderInterface
*/
public function __construct($secret)
{
trigger_error('\Symfony\Component\Security\Csrf\CsrfTokenManager was deprecated in version 2.4 and will be removed in version 3.0. Please use \Symfony\Component\Security\Csrf\TokenStorage\NativeSessionTokenStorage instead.', E_USER_DEPRECATED);

$this->secret = $secret;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ class SessionCsrfProvider extends DefaultCsrfProvider
*/
public function __construct(Session $session, $secret)
{
trigger_error('\Symfony\Component\Security\Csrf\CsrfTokenManager was deprecated in version 2.4 and will be removed in version 3.0. Please use \Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage instead.', E_USER_DEPRECATED);

parent::__construct($secret);

$this->session = $session;
Expand Down