Skip to content

Commit 143b496

Browse files
committed
refactor: move ValidatedInput to the Input namespace
1 parent a9472fe commit 143b496

12 files changed

Lines changed: 12 additions & 18 deletions

File tree

structarmed.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use CodeIgniter\Cache\ResponseCache;
1515
use CodeIgniter\HTTP\CLIRequest;
16-
use CodeIgniter\HTTP\FormRequest;
1716
use CodeIgniter\HTTP\Header;
1817
use CodeIgniter\HTTP\IncomingRequest;
1918
use CodeIgniter\HTTP\SSEResponse;
@@ -27,7 +26,6 @@
2726
use CodeIgniter\HTTP\URI;
2827
use CodeIgniter\Log\Handlers\ChromeLoggerHandler;
2928
use CodeIgniter\Security\CheckPhpIni;
30-
use CodeIgniter\Validation\ValidatedInput;
3129
use CodeIgniter\View\Table;
3230
use CodeIgniter\Database\BaseResult;
3331
use CodeIgniter\View\Plugins;
@@ -101,6 +99,7 @@
10199
'Filters' => ['HTTP'],
102100
'Honeypot' => ['Filters', 'HTTP'],
103101
'HTTP' => ['Cookie', 'Files', 'I18n', 'Input', 'Security', 'URI'],
102+
'Input' => ['I18n'],
104103
'Images' => ['Files', 'I18n'],
105104
'Lock' => ['Cache'],
106105
'Model' => ['Database', 'DataCaster', 'DataConverter', 'Entity', 'I18n', 'Pager', 'Validation'],
@@ -136,9 +135,6 @@
136135
->skipClassViolation(URICast::class, [
137136
URI::class,
138137
])
139-
->skipClassViolation(FormRequest::class, [
140-
ValidatedInput::class,
141-
])
142138
->skipClassViolation(ChromeLoggerHandler::class, [
143139
ResponseInterface::class,
144140
])

system/HTTP/FormRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
namespace CodeIgniter\HTTP;
1515

1616
use CodeIgniter\Exceptions\RuntimeException;
17-
use CodeIgniter\Validation\ValidatedInput;
17+
use CodeIgniter\Input\ValidatedInput;
1818
use ReflectionNamedType;
1919
use ReflectionParameter;
2020

system/Input/InputDataFactory.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
namespace CodeIgniter\Input;
1515

16-
use CodeIgniter\Validation\ValidatedInput;
17-
1816
/**
1917
* @see \CodeIgniter\Input\InputDataFactoryTest
2018
*/
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@
1111
* the LICENSE file that was distributed with this source code.
1212
*/
1313

14-
namespace CodeIgniter\Validation;
14+
namespace CodeIgniter\Input;
1515

1616
use CodeIgniter\Exceptions\InvalidArgumentException;
1717
use CodeIgniter\I18n\Time;
18-
use CodeIgniter\Input\InputData;
1918
use DateTimeZone;
2019
use Exception;
2120
use ReflectionEnum;
@@ -27,7 +26,7 @@
2726
* This class is stricter than InputData: missing values may use defaults and
2827
* null values remain null, but invalid present values throw.
2928
*
30-
* @see \CodeIgniter\Validation\ValidatedInputTest
29+
* @see \CodeIgniter\Input\ValidatedInputTest
3130
*/
3231
class ValidatedInput extends InputData
3332
{

system/Validation/Validation.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use CodeIgniter\HTTP\IncomingRequest;
2222
use CodeIgniter\HTTP\Method;
2323
use CodeIgniter\HTTP\RequestInterface;
24+
use CodeIgniter\Input\ValidatedInput;
2425
use CodeIgniter\Validation\Exceptions\ValidationException;
2526
use CodeIgniter\View\RendererInterface;
2627

system/Validation/ValidationInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
use CodeIgniter\Database\BaseConnection;
1717
use CodeIgniter\HTTP\RequestInterface;
18+
use CodeIgniter\Input\ValidatedInput;
1819

1920
/**
2021
* Expected behavior of a validator

tests/system/HTTP/FormRequestTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515

1616
use CodeIgniter\Config\Services;
1717
use CodeIgniter\Exceptions\RuntimeException;
18+
use CodeIgniter\Input\ValidatedInput;
1819
use CodeIgniter\Superglobals;
1920
use CodeIgniter\Test\CIUnitTestCase;
2021
use CodeIgniter\Test\Mock\MockCodeIgniter;
21-
use CodeIgniter\Validation\ValidatedInput;
2222
use Config\App;
2323
use PHPUnit\Framework\Attributes\BackupGlobals;
2424
use PHPUnit\Framework\Attributes\Group;

tests/system/Input/InputDataFactoryTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
namespace CodeIgniter\Input;
1515

1616
use CodeIgniter\Test\CIUnitTestCase;
17-
use CodeIgniter\Validation\ValidatedInput;
1817
use PHPUnit\Framework\Attributes\Group;
1918

2019
/**

tests/system/Validation/ValidatedInputTest.php renamed to tests/system/Input/ValidatedInputTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@
1111
* the LICENSE file that was distributed with this source code.
1212
*/
1313

14-
namespace CodeIgniter\Validation;
14+
namespace CodeIgniter\Input;
1515

1616
use CodeIgniter\Exceptions\InvalidArgumentException;
1717
use CodeIgniter\I18n\Time;
18-
use CodeIgniter\Input\InputData;
1918
use CodeIgniter\Test\CIUnitTestCase;
2019
use PHPUnit\Framework\Attributes\Group;
2120
use Tests\Support\Enum\ColorEnum;

tests/system/Validation/ValidationTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use CodeIgniter\HTTP\IncomingRequest;
2020
use CodeIgniter\HTTP\SiteURI;
2121
use CodeIgniter\HTTP\UserAgent;
22+
use CodeIgniter\Input\ValidatedInput;
2223
use CodeIgniter\Superglobals;
2324
use CodeIgniter\Test\CIUnitTestCase;
2425
use CodeIgniter\Validation\Exceptions\ValidationException;

0 commit comments

Comments
 (0)