Skip to content
Open
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
6 changes: 1 addition & 5 deletions structarmed.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

use CodeIgniter\Cache\ResponseCache;
use CodeIgniter\HTTP\CLIRequest;
use CodeIgniter\HTTP\FormRequest;
use CodeIgniter\HTTP\Header;
use CodeIgniter\HTTP\IncomingRequest;
use CodeIgniter\HTTP\SSEResponse;
Expand All @@ -27,7 +26,6 @@
use CodeIgniter\HTTP\URI;
use CodeIgniter\Log\Handlers\ChromeLoggerHandler;
use CodeIgniter\Security\CheckPhpIni;
use CodeIgniter\Validation\ValidatedInput;
use CodeIgniter\View\Table;
use CodeIgniter\Database\BaseResult;
use CodeIgniter\View\Plugins;
Expand Down Expand Up @@ -101,6 +99,7 @@
'Filters' => ['HTTP'],
'Honeypot' => ['Filters', 'HTTP'],
'HTTP' => ['Cookie', 'Files', 'I18n', 'Input', 'Security', 'URI'],
'Input' => ['I18n'],
'Images' => ['Files', 'I18n'],
'Lock' => ['Cache'],
'Model' => ['Database', 'DataCaster', 'DataConverter', 'Entity', 'I18n', 'Pager', 'Validation'],
Expand Down Expand Up @@ -136,9 +135,6 @@
->skipClassViolation(URICast::class, [
URI::class,
])
->skipClassViolation(FormRequest::class, [
ValidatedInput::class,
])
->skipClassViolation(ChromeLoggerHandler::class, [
ResponseInterface::class,
])
Expand Down
2 changes: 1 addition & 1 deletion system/HTTP/FormRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace CodeIgniter\HTTP;

use CodeIgniter\Exceptions\RuntimeException;
use CodeIgniter\Validation\ValidatedInput;
use CodeIgniter\Input\ValidatedInput;
use ReflectionNamedType;
use ReflectionParameter;

Expand Down
2 changes: 0 additions & 2 deletions system/Input/InputDataFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

namespace CodeIgniter\Input;

use CodeIgniter\Validation\ValidatedInput;

/**
* @see \CodeIgniter\Input\InputDataFactoryTest
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Validation;
namespace CodeIgniter\Input;

use CodeIgniter\Exceptions\InvalidArgumentException;
use CodeIgniter\I18n\Time;
use CodeIgniter\Input\InputData;
use DateTimeZone;
use Exception;
use ReflectionEnum;
Expand All @@ -27,7 +26,7 @@
* This class is stricter than InputData: missing values may use defaults and
* null values remain null, but invalid present values throw.
*
* @see \CodeIgniter\Validation\ValidatedInputTest
* @see \CodeIgniter\Input\ValidatedInputTest
*/
class ValidatedInput extends InputData
{
Expand Down
1 change: 1 addition & 0 deletions system/Validation/Validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use CodeIgniter\HTTP\IncomingRequest;
use CodeIgniter\HTTP\Method;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\Input\ValidatedInput;
use CodeIgniter\Validation\Exceptions\ValidationException;
use CodeIgniter\View\RendererInterface;

Expand Down
1 change: 1 addition & 0 deletions system/Validation/ValidationInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

use CodeIgniter\Database\BaseConnection;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\Input\ValidatedInput;

/**
* Expected behavior of a validator
Expand Down
2 changes: 1 addition & 1 deletion tests/system/HTTP/FormRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

use CodeIgniter\Config\Services;
use CodeIgniter\Exceptions\RuntimeException;
use CodeIgniter\Input\ValidatedInput;
use CodeIgniter\Superglobals;
use CodeIgniter\Test\CIUnitTestCase;
use CodeIgniter\Test\Mock\MockCodeIgniter;
use CodeIgniter\Validation\ValidatedInput;
use Config\App;
use PHPUnit\Framework\Attributes\BackupGlobals;
use PHPUnit\Framework\Attributes\Group;
Expand Down
1 change: 0 additions & 1 deletion tests/system/Input/InputDataFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
namespace CodeIgniter\Input;

use CodeIgniter\Test\CIUnitTestCase;
use CodeIgniter\Validation\ValidatedInput;
use PHPUnit\Framework\Attributes\Group;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
* the LICENSE file that was distributed with this source code.
*/

namespace CodeIgniter\Validation;
namespace CodeIgniter\Input;

use CodeIgniter\Exceptions\InvalidArgumentException;
use CodeIgniter\I18n\Time;
use CodeIgniter\Input\InputData;
use CodeIgniter\Test\CIUnitTestCase;
use PHPUnit\Framework\Attributes\Group;
use Tests\Support\Enum\ColorEnum;
Expand Down
1 change: 1 addition & 0 deletions tests/system/Validation/ValidationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use CodeIgniter\HTTP\IncomingRequest;
use CodeIgniter\HTTP\SiteURI;
use CodeIgniter\HTTP\UserAgent;
use CodeIgniter\Input\ValidatedInput;
use CodeIgniter\Superglobals;
use CodeIgniter\Test\CIUnitTestCase;
use CodeIgniter\Validation\Exceptions\ValidationException;
Expand Down
4 changes: 2 additions & 2 deletions user_guide_src/source/changelogs/v4.8.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ update your implementations to include the new methods or method changes to ensu
- **Database:** ``CodeIgniter\Database\ConnectionInterface`` now requires the ``afterCommit()``, ``afterRollback()``, ``inTransaction()``, and ``transaction()`` methods.
- **Logging:** ``CodeIgniter\Log\Handlers\HandlerInterface::handle()`` now requires a third parameter ``array $context = []``. Any custom log handler that overrides ``handle()`` - whether implementing ``HandlerInterface`` directly or extending a built-in handler class - must add the parameter to its ``handle()`` method signature.
- **Security:** The ``SecurityInterface``'s ``verify()`` method now has a native return type of ``static``.
- **Validation:** ``CodeIgniter\Validation\ValidationInterface`` now requires the ``getValidatedInput()`` method, which returns a ``CodeIgniter\Validation\ValidatedInput`` instance.
- **Validation:** ``CodeIgniter\Validation\ValidationInterface`` now requires the ``getValidatedInput()`` method, which returns a ``CodeIgniter\Input\ValidatedInput`` instance.

Method Signature Changes
========================
Expand Down Expand Up @@ -333,7 +333,7 @@ Others
======

- **Float and Double Casting:** Added support for precision and rounding mode when casting to float or double in entities.
- Added ``CodeIgniter\Input\InputData`` and ``InputDataFactory`` for reusable typed input data objects.
- Added ``CodeIgniter\Input\InputData``, ``ValidatedInput``, and ``InputDataFactory`` for reusable typed input data objects.
- Float and Double casting now throws ``CastException::forInvalidFloatRoundingMode()`` if an rounding mode other than up, down, even or odd is provided.
- **Filters:** Added ``RequestId`` filter for request tracing and correlation logging. The filter stores the request ID in the request context and automatically adds the ``X-Request-ID`` response header. Incoming ``X-Request-ID`` headers are used when valid. See :ref:`requestid` for details.
- **Environment:** Added ``CodeIgniter\EnvironmentDetector`` class and corresponding ``environment`` service as a mockable wrapper around the ``ENVIRONMENT`` constant.
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/libraries/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ Typed Validated Input
---------------------

``getValidatedInput()`` returns the same validated data as a
``CodeIgniter\Validation\ValidatedInput`` object. Use it after validation
``CodeIgniter\Input\ValidatedInput`` object. Use it after validation
succeeds when you want to read common controller values as strings, integers,
floats, booleans, arrays, dates, or enums:

Expand Down
Loading