Skip to content
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

[4.4] refactor: moving RedirectException. #7545

Merged
merged 3 commits into from
Jun 11, 2023
Merged
Show file tree
Hide file tree
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
Next Next commit
refactor: moving RedirectException.
  • Loading branch information
iRedds committed Jun 7, 2023
commit b9f5c83593598b3a1296ad9d2631e5044c5d0c47
2 changes: 1 addition & 1 deletion system/CodeIgniter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
use CodeIgniter\Exceptions\PageNotFoundException;
use CodeIgniter\HTTP\CLIRequest;
use CodeIgniter\HTTP\DownloadResponse;
use CodeIgniter\HTTP\Exceptions\RedirectException;
use CodeIgniter\HTTP\IncomingRequest;
use CodeIgniter\HTTP\RedirectResponse;
use CodeIgniter\HTTP\Request;
use CodeIgniter\HTTP\ResponseInterface;
use CodeIgniter\HTTP\URI;
use CodeIgniter\Router\Exceptions\RedirectException;
use CodeIgniter\Router\RouteCollectionInterface;
use CodeIgniter\Router\Router;
use Config\App;
Expand Down
2 changes: 1 addition & 1 deletion system/Commands/Utilities/Routes/FilterFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use CodeIgniter\Exceptions\PageNotFoundException;
use CodeIgniter\Filters\Filters;
use CodeIgniter\Router\Exceptions\RedirectException;
use CodeIgniter\HTTP\Exceptions\RedirectException;
use CodeIgniter\Router\Router;
use Config\Services;

Expand Down
28 changes: 28 additions & 0 deletions system/HTTP/Exceptions/RedirectException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

/**
* This file is part of CodeIgniter 4 framework.
*
* (c) CodeIgniter Foundation <admin@codeigniter.com>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\HTTP\Exceptions;

use CodeIgniter\Exceptions\HTTPExceptionInterface;
use Exception;

/**
* RedirectException
*/
class RedirectException extends Exception implements HTTPExceptionInterface
{
/**
* HTTP status code for redirects
*
* @var int
*/
protected $code = 302;
}
2 changes: 2 additions & 0 deletions system/Router/Exceptions/RedirectException.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

/**
* RedirectException
*
* @deprecated Use \CodeIgniter\HTTP\Exceptions\RedirectException instead
*/
class RedirectException extends Exception implements HTTPExceptionInterface
{
Expand Down
2 changes: 1 addition & 1 deletion system/Router/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

use Closure;
use CodeIgniter\Exceptions\PageNotFoundException;
use CodeIgniter\HTTP\Exceptions\RedirectException;
use CodeIgniter\HTTP\Request;
use CodeIgniter\Router\Exceptions\RedirectException;
use CodeIgniter\Router\Exceptions\RouterException;

/**
Expand Down
3 changes: 1 addition & 2 deletions system/Test/FeatureTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@
namespace CodeIgniter\Test;

use CodeIgniter\Events\Events;
use CodeIgniter\HTTP\Exceptions\RedirectException;
use CodeIgniter\HTTP\IncomingRequest;
use CodeIgniter\HTTP\Request;
use CodeIgniter\HTTP\URI;
use CodeIgniter\HTTP\UserAgent;
use CodeIgniter\Router\Exceptions\RedirectException;
use CodeIgniter\Router\RouteCollection;
use Config\Services;
use Exception;
use ReflectionException;
Expand Down
3 changes: 1 addition & 2 deletions system/Test/FeatureTestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
namespace CodeIgniter\Test;

use CodeIgniter\Events\Events;
use CodeIgniter\HTTP\Exceptions\RedirectException;
use CodeIgniter\HTTP\IncomingRequest;
use CodeIgniter\HTTP\Request;
use CodeIgniter\HTTP\URI;
use CodeIgniter\Router\Exceptions\RedirectException;
use CodeIgniter\Router\RouteCollection;
use Config\App;
use Config\Services;
use Exception;
Expand Down
2 changes: 1 addition & 1 deletion tests/system/Router/RouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

use CodeIgniter\Config\Services;
use CodeIgniter\Exceptions\PageNotFoundException;
use CodeIgniter\HTTP\Exceptions\RedirectException;
use CodeIgniter\HTTP\IncomingRequest;
use CodeIgniter\Router\Exceptions\RedirectException;
use CodeIgniter\Router\Exceptions\RouterException;
use CodeIgniter\Test\CIUnitTestCase;
use Config\Modules;
Expand Down
1 change: 1 addition & 0 deletions user_guide_src/source/changelogs/v4.4.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ Deprecations
``ExceptionHandler``.
- **Autoloader:** ``Autoloader::sanitizeFilename()`` is deprecated.
- **CodeIgniter:** ``CodeIgniter::$returnResponse`` property is deprecated. No longer used.
- **RedirectException:** ``\CodeIgniter\Router\Exceptions\RedirectException`` is deprecated. Use \CodeIgniter\HTTP\Exceptions\RedirectException instead.

Bugs Fixed
**********
Expand Down