Skip to content

Commit d8342dd

Browse files
committed
fix: HTTPExcetpion is not needed
1 parent aa1a5cb commit d8342dd

5 files changed

Lines changed: 7 additions & 15 deletions

File tree

src/Authentication/AuthenticationException.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
namespace CodeIgniter\Shield\Authentication;
44

5-
use CodeIgniter\Shield\Exceptions\HTTPException;
5+
use CodeIgniter\HTTP\Exceptions\HTTPException;
6+
use CodeIgniter\Shield\Exceptions\RuntimeException;
67

7-
class AuthenticationException extends HTTPException
8+
class AuthenticationException extends RuntimeException
89
{
910
protected $code = 403;
1011

src/Authentication/Passwords/PwnedValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
namespace CodeIgniter\Shield\Authentication\Passwords;
44

55
use CodeIgniter\Config\Services;
6+
use CodeIgniter\HTTP\Exceptions\HTTPException;
67
use CodeIgniter\Shield\Authentication\AuthenticationException;
78
use CodeIgniter\Shield\Entities\User;
8-
use CodeIgniter\Shield\Exceptions\HTTPException;
99
use CodeIgniter\Shield\Result;
1010

1111
/**

src/Authorization/AuthorizationException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace CodeIgniter\Shield\Authorization;
44

5-
use CodeIgniter\Shield\Exceptions\HTTPException;
5+
use CodeIgniter\Shield\Exceptions\RuntimeException;
66

7-
class AuthorizationException extends HTTPException
7+
class AuthorizationException extends RuntimeException
88
{
99
protected $code = 401;
1010

src/Exceptions/HTTPException.php

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/Unit/PwnedValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
namespace Tests\Unit;
44

5+
use CodeIgniter\HTTP\Exceptions\HTTPException;
56
use CodeIgniter\HTTP\Response;
67
use CodeIgniter\Shield\Authentication\AuthenticationException;
78
use CodeIgniter\Shield\Authentication\Passwords\PwnedValidator;
89
use CodeIgniter\Shield\Config\Auth as AuthConfig;
910
use CodeIgniter\Shield\Config\Services;
10-
use CodeIgniter\Shield\Exceptions\HTTPException;
1111
use CodeIgniter\Test\CIUnitTestCase;
1212
use Config\App;
1313

0 commit comments

Comments
 (0)