Skip to content

Commit

Permalink
Fix deprecation messages
Browse files Browse the repository at this point in the history
  • Loading branch information
phansys authored and jordisala1991 committed Jul 28, 2020
1 parent 0785115 commit 611e254
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
14 changes: 7 additions & 7 deletions src/Controller/AdminResettingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@

namespace Sonata\UserBundle\Controller;

// NEXT_MAJOR: remove this file
@trigger_error(
'The '.__NAMESPACE__.'\AdminResettingController class is deprecated since version 4.3.0 and will be removed in 5.0.'
.' Use '.__NAMESPACE__.'\RequestAction, '.__NAMESPACE__.'\CheckEmailAction, '.__NAMESPACE__.'\ResetAction or '.__NAMESPACE__.'\SendEmailAction instead.',
E_USER_DEPRECATED
);

use Sonata\UserBundle\Action\CheckEmailAction;
use Sonata\UserBundle\Action\RequestAction;
use Sonata\UserBundle\Action\ResetAction;
Expand All @@ -28,6 +21,13 @@
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

// NEXT_MAJOR: remove this file
@trigger_error(
'The '.__NAMESPACE__.'\AdminResettingController class is deprecated since version 4.3.0 and will be removed in 5.0.'
.' Use '.RequestAction::class.', '.CheckEmailAction::class.', '.ResetAction::class.' or '.SendEmailAction::class.' instead.',
E_USER_DEPRECATED
);

class AdminResettingController extends Controller
{
/**
Expand Down
14 changes: 7 additions & 7 deletions src/Controller/AdminSecurityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@

namespace Sonata\UserBundle\Controller;

// NEXT_MAJOR: remove this file
@trigger_error(
'The '.__NAMESPACE__.'\AdminSecurityController class is deprecated since version 4.3.0 and will be removed in 5.0.'
.' Use '.__NAMESPACE__.'\CheckLoginAction, '.__NAMESPACE__.'\LoginAction or '.__NAMESPACE__.'\LogoutAction instead.',
E_USER_DEPRECATED
);

use Sonata\UserBundle\Action\CheckLoginAction;
use Sonata\UserBundle\Action\LoginAction;
use Sonata\UserBundle\Action\LogoutAction;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

// NEXT_MAJOR: remove this file
@trigger_error(
'The '.__NAMESPACE__.'\AdminSecurityController class is deprecated since version 4.3.0 and will be removed in 5.0.'
.' Use '.CheckLoginAction::class.', '.LoginAction::class.' or '.LogoutAction::class.' instead.',
E_USER_DEPRECATED
);

class AdminSecurityController extends Controller
{
public function loginAction(Request $request): Response
Expand Down
2 changes: 1 addition & 1 deletion tests/Controller/AdminResettingControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function getController(): AdminResettingController

/**
* @group legacy
* @expectedDeprecation The Sonata\UserBundle\Controller\AdminResettingController class is deprecated since version 4.3.0 and will be removed in 5.0. Use Sonata\UserBundle\Controller\RequestAction, Sonata\UserBundle\Controller\CheckEmailAction, Sonata\UserBundle\Controller\ResetAction or Sonata\UserBundle\Controller\SendEmailAction instead.
* @expectedDeprecation The Sonata\UserBundle\Controller\AdminResettingController class is deprecated since version 4.3.0 and will be removed in 5.0. Use Sonata\UserBundle\Action\RequestAction, Sonata\UserBundle\Action\CheckEmailAction, Sonata\UserBundle\Action\ResetAction or Sonata\UserBundle\Action\SendEmailAction instead.
*/
public function testCheckEmailAction(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Controller/AdminSecurityControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function getController(): AdminSecurityController

/**
* @group legacy
* @expectedDeprecation The Sonata\UserBundle\Controller\AdminSecurityController class is deprecated since version 4.3.0 and will be removed in 5.0. Use Sonata\UserBundle\Controller\CheckLoginAction, Sonata\UserBundle\Controller\LoginAction or Sonata\UserBundle\Controller\LogoutAction instead.
* @expectedDeprecation The Sonata\UserBundle\Controller\AdminSecurityController class is deprecated since version 4.3.0 and will be removed in 5.0. Use Sonata\UserBundle\Action\CheckLoginAction, Sonata\UserBundle\Action\LoginAction or Sonata\UserBundle\Action\LogoutAction instead.
*/
public function testLogoutAction(): void
{
Expand Down

0 comments on commit 611e254

Please sign in to comment.