From 6b95b25ac598ed43ba7ed3174920a490036d056d Mon Sep 17 00:00:00 2001 From: michalsn Date: Sat, 20 Dec 2025 17:14:20 +0100 Subject: [PATCH 1/2] chore: remove IncomingRequest deprecations --- system/HTTP/IncomingRequest.php | 134 +----------- .../HTTP/IncomingRequestDetectingTest.php | 196 ------------------ tests/system/HTTP/IncomingRequestTest.php | 33 +-- user_guide_src/source/changelogs/v4.7.0.rst | 8 +- .../codeigniter.getReassignArray.neon | 7 +- .../codeigniter.superglobalAccess.neon | 17 +- .../codeigniter.superglobalAccessAssign.neon | 102 +-------- utils/phpstan-baseline/loader.neon | 2 +- .../missingType.iterableValue.neon | 7 +- 9 files changed, 16 insertions(+), 490 deletions(-) delete mode 100644 tests/system/HTTP/IncomingRequestDetectingTest.php diff --git a/system/HTTP/IncomingRequest.php b/system/HTTP/IncomingRequest.php index 260f7457fadc..7fb5cd85bca7 100644 --- a/system/HTTP/IncomingRequest.php +++ b/system/HTTP/IncomingRequest.php @@ -200,133 +200,6 @@ public function detectLocale($config) $this->setLocale($this->negotiate('language', $config->supportedLocales)); } - /** - * Sets up our URI object based on the information we have. This is - * either provided by the user in the baseURL Config setting, or - * determined from the environment as needed. - * - * @return void - * - * @deprecated 4.4.0 No longer used. - */ - protected function detectURI(string $protocol, string $baseURL) - { - $this->setPath($this->detectPath($this->config->uriProtocol), $this->config); - } - - /** - * Detects the relative path based on - * the URIProtocol Config setting. - * - * @deprecated 4.4.0 Moved to SiteURIFactory. - */ - public function detectPath(string $protocol = ''): string - { - if ($protocol === '') { - $protocol = 'REQUEST_URI'; - } - - $this->path = match ($protocol) { - 'REQUEST_URI' => $this->parseRequestURI(), - 'QUERY_STRING' => $this->parseQueryString(), - default => $this->fetchGlobal('server', $protocol) ?? $this->parseRequestURI(), - }; - - return $this->path; - } - - /** - * Will parse the REQUEST_URI and automatically detect the URI from it, - * fixing the query string if necessary. - * - * @return string The URI it found. - * - * @deprecated 4.4.0 Moved to SiteURIFactory. - */ - protected function parseRequestURI(): string - { - if (! isset($_SERVER['REQUEST_URI'], $_SERVER['SCRIPT_NAME'])) { - return ''; - } - - // parse_url() returns false if no host is present, but the path or query string - // contains a colon followed by a number. So we attach a dummy host since - // REQUEST_URI does not include the host. This allows us to parse out the query string and path. - $parts = parse_url('http://dummy' . $_SERVER['REQUEST_URI']); - $query = $parts['query'] ?? ''; - $uri = $parts['path'] ?? ''; - - // Strip the SCRIPT_NAME path from the URI - if ( - $uri !== '' && isset($_SERVER['SCRIPT_NAME'][0]) - && pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_EXTENSION) === 'php' - ) { - // Compare each segment, dropping them until there is no match - $segments = $keep = explode('/', $uri); - - foreach (explode('/', $_SERVER['SCRIPT_NAME']) as $i => $segment) { - // If these segments are not the same then we're done - if (! isset($segments[$i]) || $segment !== $segments[$i]) { - break; - } - - array_shift($keep); - } - - $uri = implode('/', $keep); - } - - // This section ensures that even on servers that require the URI to contain the query string (Nginx) a correct - // URI is found, and also fixes the QUERY_STRING Server var and $_GET array. - if (trim($uri, '/') === '' && str_starts_with($query, '/')) { - $query = explode('?', $query, 2); - $uri = $query[0]; - $_SERVER['QUERY_STRING'] = $query[1] ?? ''; - } else { - $_SERVER['QUERY_STRING'] = $query; - } - - // Update our globals for values likely to been have changed - parse_str($_SERVER['QUERY_STRING'], $_GET); - $this->populateGlobals('server'); - $this->populateGlobals('get'); - - $uri = URI::removeDotSegments($uri); - - return ($uri === '/' || $uri === '') ? '/' : ltrim($uri, '/'); - } - - /** - * Parse QUERY_STRING - * - * Will parse QUERY_STRING and automatically detect the URI from it. - * - * @deprecated 4.4.0 Moved to SiteURIFactory. - */ - protected function parseQueryString(): string - { - $uri = $_SERVER['QUERY_STRING'] ?? @getenv('QUERY_STRING'); - - if (trim($uri, '/') === '') { - return '/'; - } - - if (str_starts_with($uri, '/')) { - $uri = explode('?', $uri, 2); - $_SERVER['QUERY_STRING'] = $uri[1] ?? ''; - $uri = $uri[0]; - } - - // Update our globals for values likely to been have changed - parse_str($_SERVER['QUERY_STRING'], $_GET); - $this->populateGlobals('server'); - $this->populateGlobals('get'); - - $uri = URI::removeDotSegments($uri); - - return ($uri === '/' || $uri === '') ? '/' : ltrim($uri, '/'); - } - /** * Provides a convenient way to work with the Negotiate class * for content negotiation. @@ -411,14 +284,11 @@ public function isSecure(): bool * instance, this can be used to change the "current URL" * for testing. * - * @param string $path URI path relative to baseURL - * @param App|null $config Optional alternate config to use + * @param string $path URI path relative to baseURL * * @return $this - * - * @deprecated 4.4.0 This method will be private. The parameter $config is deprecated. No longer used. */ - public function setPath(string $path, ?App $config = null) + private function setPath(string $path) { $this->path = $path; diff --git a/tests/system/HTTP/IncomingRequestDetectingTest.php b/tests/system/HTTP/IncomingRequestDetectingTest.php deleted file mode 100644 index fa53060b6a83..000000000000 --- a/tests/system/HTTP/IncomingRequestDetectingTest.php +++ /dev/null @@ -1,196 +0,0 @@ - - * - * For the full copyright and license information, please view - * the LICENSE file that was distributed with this source code. - */ - -namespace CodeIgniter\HTTP; - -use CodeIgniter\Test\CIUnitTestCase; -use Config\App; -use PHPUnit\Framework\Attributes\BackupGlobals; -use PHPUnit\Framework\Attributes\Group; - -/** - * @internal - */ -#[BackupGlobals(true)] -#[Group('Others')] -final class IncomingRequestDetectingTest extends CIUnitTestCase -{ - private IncomingRequest $request; - - protected function setUp(): void - { - parent::setUp(); - - $_POST = $_GET = $_SERVER = $_REQUEST = $_ENV = $_COOKIE = $_SESSION = []; - - // The URI object is not used in detectPath(). - $this->request = new IncomingRequest(new App(), new SiteURI(new App(), 'woot?code=good#pos'), null, new UserAgent()); - } - - public function testPathDefault(): void - { - // /index.php/woot?code=good#pos - $_SERVER['REQUEST_URI'] = '/index.php/woot'; - $_SERVER['SCRIPT_NAME'] = '/index.php'; - - $expected = 'woot'; - $this->assertSame($expected, $this->request->detectPath()); - } - - public function testPathDefaultEmpty(): void - { - // / - $_SERVER['REQUEST_URI'] = '/'; - $_SERVER['SCRIPT_NAME'] = '/index.php'; - - $expected = '/'; - $this->assertSame($expected, $this->request->detectPath()); - } - - public function testPathRequestURI(): void - { - // /index.php/woot?code=good#pos - $_SERVER['REQUEST_URI'] = '/index.php/woot'; - $_SERVER['SCRIPT_NAME'] = '/index.php'; - - $expected = 'woot'; - $this->assertSame($expected, $this->request->detectPath('REQUEST_URI')); - } - - public function testPathRequestURINested(): void - { - // I'm not sure but this is a case of Apache config making such SERVER - // values? - // The current implementation doesn't use the value of the URI object. - // So I removed the code to set URI. Therefore, it's exactly the same as - // the method above as a test. - // But it may be changed in the future to use the value of the URI object. - // So I don't remove this test case. - - // /ci/index.php/woot?code=good#pos - $_SERVER['REQUEST_URI'] = '/index.php/woot'; - $_SERVER['SCRIPT_NAME'] = '/index.php'; - - $expected = 'woot'; - $this->assertSame($expected, $this->request->detectPath('REQUEST_URI')); - } - - public function testPathRequestURISubfolder(): void - { - // /ci/index.php/popcorn/woot?code=good#pos - $_SERVER['REQUEST_URI'] = '/ci/index.php/popcorn/woot'; - $_SERVER['SCRIPT_NAME'] = '/ci/index.php'; - - $expected = 'popcorn/woot'; - $this->assertSame($expected, $this->request->detectPath('REQUEST_URI')); - } - - public function testPathRequestURINoIndex(): void - { - // /sub/example - $_SERVER['REQUEST_URI'] = '/sub/example'; - $_SERVER['SCRIPT_NAME'] = '/sub/index.php'; - - $expected = 'example'; - $this->assertSame($expected, $this->request->detectPath('REQUEST_URI')); - } - - public function testPathRequestURINginx(): void - { - // /ci/index.php/woot?code=good#pos - $_SERVER['REQUEST_URI'] = '/index.php/woot?code=good'; - $_SERVER['SCRIPT_NAME'] = '/index.php'; - - $expected = 'woot'; - $this->assertSame($expected, $this->request->detectPath('REQUEST_URI')); - } - - public function testPathRequestURINginxRedirecting(): void - { - // /?/ci/index.php/woot - $_SERVER['REQUEST_URI'] = '/?/ci/woot'; - $_SERVER['SCRIPT_NAME'] = '/index.php'; - - $expected = 'ci/woot'; - $this->assertSame($expected, $this->request->detectPath('REQUEST_URI')); - } - - public function testPathRequestURISuppressed(): void - { - // /woot?code=good#pos - $_SERVER['REQUEST_URI'] = '/woot'; - $_SERVER['SCRIPT_NAME'] = '/'; - - $expected = 'woot'; - $this->assertSame($expected, $this->request->detectPath('REQUEST_URI')); - } - - public function testPathQueryString(): void - { - // /index.php?/ci/woot - $_SERVER['REQUEST_URI'] = '/index.php?/ci/woot'; - $_SERVER['QUERY_STRING'] = '/ci/woot'; - $_SERVER['SCRIPT_NAME'] = '/index.php'; - - $expected = 'ci/woot'; - $this->assertSame($expected, $this->request->detectPath('QUERY_STRING')); - } - - public function testPathQueryStringWithQueryString(): void - { - // /index.php?/ci/woot?code=good#pos - $_SERVER['REQUEST_URI'] = '/index.php?/ci/woot?code=good'; - $_SERVER['QUERY_STRING'] = '/ci/woot?code=good'; - $_SERVER['SCRIPT_NAME'] = '/index.php'; - - $expected = 'ci/woot'; - $this->assertSame($expected, $this->request->detectPath('QUERY_STRING')); - } - - public function testPathQueryStringEmpty(): void - { - // /index.php? - $_SERVER['REQUEST_URI'] = '/index.php?'; - $_SERVER['QUERY_STRING'] = ''; - $_SERVER['SCRIPT_NAME'] = '/index.php'; - - $expected = '/'; - $this->assertSame($expected, $this->request->detectPath('QUERY_STRING')); - } - - public function testPathPathInfo(): void - { - // /index.php/woot?code=good#pos - $this->request->setGlobal('server', [ - 'PATH_INFO' => null, - ]); - $_SERVER['REQUEST_URI'] = '/index.php/woot'; - $_SERVER['SCRIPT_NAME'] = '/index.php'; - - $expected = 'woot'; - $this->assertSame($expected, $this->request->detectPath('PATH_INFO')); - } - - public function testPathPathInfoGlobal(): void - { - // /index.php/woot?code=good#pos - $this->request->setGlobal('server', [ - 'PATH_INFO' => 'silliness', - ]); - $_SERVER['REQUEST_URI'] = '/index.php/woot'; - $_SERVER['SCRIPT_NAME'] = '/index.php'; - - $expected = 'silliness'; - $this->assertSame($expected, $this->request->detectPath('PATH_INFO')); - } -} diff --git a/tests/system/HTTP/IncomingRequestTest.php b/tests/system/HTTP/IncomingRequestTest.php index a26039374e18..7829786f7f4e 100644 --- a/tests/system/HTTP/IncomingRequestTest.php +++ b/tests/system/HTTP/IncomingRequestTest.php @@ -909,36 +909,6 @@ public function testGetPostIndexNotExists(): void $this->assertNull($this->request->getGetPost('gc')); } - /** - * @param mixed $path - * @param mixed $detectPath - */ - #[DataProvider('provideExtensionPHP')] - public function testExtensionPHP($path, $detectPath): void - { - $config = new App(); - $config->baseURL = 'http://example.com/'; - - $_SERVER['REQUEST_URI'] = $path; - $_SERVER['SCRIPT_NAME'] = $path; - $request = new IncomingRequest($config, new SiteURI($config, $path), null, new UserAgent()); - $this->assertSame($detectPath, $request->detectPath()); - } - - public static function provideExtensionPHP(): iterable - { - return [ - 'not /index.php' => [ - '/test.php', - '/', - ], - '/index.php' => [ - '/index.php', - '/', - ], - ]; - } - public function testGetPath(): void { $request = $this->createRequest(null, null, 'fruits/banana'); @@ -952,7 +922,8 @@ public function testSetPath(): void $request = new IncomingRequest($config, new SiteURI($config), null, new UserAgent()); $this->assertSame('', $request->getPath()); - $request->setPath('foobar'); + $setPath = $this->getPrivateMethodInvoker($request, 'setPath'); + $setPath('foobar'); $this->assertSame('foobar', $request->getPath()); } diff --git a/user_guide_src/source/changelogs/v4.7.0.rst b/user_guide_src/source/changelogs/v4.7.0.rst index 70b27b15a600..8d1f46962e25 100644 --- a/user_guide_src/source/changelogs/v4.7.0.rst +++ b/user_guide_src/source/changelogs/v4.7.0.rst @@ -100,10 +100,16 @@ Method Signature Changes Removed Deprecated Items ======================== -- **Text Helper:** The deprecated types in ``random_string()`` function: ``basic``, ``md5``, and ``sha1`` has been removed. - **BaseModel:** The deprecated method ``transformDataRowToArray()`` has been removed. - **CodeIgniter:** The deprecated ``CodeIgniter\CodeIgniter::resolvePlatformExtensions()`` has been removed. - **Cache:** The deprecated return type ``false`` for ``CodeIgniter\Cache\CacheInterface::getMetaData()`` has been replaced with ``null`` type. +- **IncomingRequest:** The deprecated methods has been removed: + - ``CodeIgniter\HTTP\IncomingRequest\detectURI()`` + - ``CodeIgniter\HTTP\IncomingRequest\detectPath()`` + - ``CodeIgniter\HTTP\IncomingRequest\parseRequestURI()`` + - ``CodeIgniter\HTTP\IncomingRequest\parseQueryString()`` +- **IncomingRequest:** The deprecated ``$config`` parameter has been removed from ``CodeIgniter\HTTP\IncomingRequest::setPath()``, and the method visibility has been changed from ``public`` to ``private``. +- **Text Helper:** The deprecated types in ``random_string()`` function: ``basic``, ``md5``, and ``sha1`` has been removed. ************ Enhancements diff --git a/utils/phpstan-baseline/codeigniter.getReassignArray.neon b/utils/phpstan-baseline/codeigniter.getReassignArray.neon index b661a9e9d7de..6c45e13961e4 100644 --- a/utils/phpstan-baseline/codeigniter.getReassignArray.neon +++ b/utils/phpstan-baseline/codeigniter.getReassignArray.neon @@ -1,4 +1,4 @@ -# total 19 errors +# total 18 errors parameters: ignoreErrors: @@ -17,11 +17,6 @@ parameters: count: 1 path: ../../tests/system/HTTP/CLIRequestTest.php - - - message: '#^Re\-assigning arrays to \$_GET directly is discouraged\.$#' - count: 1 - path: ../../tests/system/HTTP/IncomingRequestDetectingTest.php - - message: '#^Re\-assigning arrays to \$_GET directly is discouraged\.$#' count: 1 diff --git a/utils/phpstan-baseline/codeigniter.superglobalAccess.neon b/utils/phpstan-baseline/codeigniter.superglobalAccess.neon index 00869afc1f4e..ab837de286c5 100644 --- a/utils/phpstan-baseline/codeigniter.superglobalAccess.neon +++ b/utils/phpstan-baseline/codeigniter.superglobalAccess.neon @@ -1,4 +1,4 @@ -# total 68 errors +# total 59 errors parameters: ignoreErrors: @@ -72,21 +72,6 @@ parameters: count: 2 path: ../../system/HTTP/IncomingRequest.php - - - message: '#^Accessing offset ''QUERY_STRING'' directly on \$_SERVER is discouraged\.$#' - count: 3 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Accessing offset ''REQUEST_URI'' directly on \$_SERVER is discouraged\.$#' - count: 2 - path: ../../system/HTTP/IncomingRequest.php - - - - message: '#^Accessing offset ''SCRIPT_NAME'' directly on \$_SERVER is discouraged\.$#' - count: 4 - path: ../../system/HTTP/IncomingRequest.php - - message: '#^Accessing offset array\|string directly on \$_GET is discouraged\.$#' count: 2 diff --git a/utils/phpstan-baseline/codeigniter.superglobalAccessAssign.neon b/utils/phpstan-baseline/codeigniter.superglobalAccessAssign.neon index 71e76f0cfe41..c557d777faf5 100644 --- a/utils/phpstan-baseline/codeigniter.superglobalAccessAssign.neon +++ b/utils/phpstan-baseline/codeigniter.superglobalAccessAssign.neon @@ -1,4 +1,4 @@ -# total 459 errors +# total 423 errors parameters: ignoreErrors: @@ -12,11 +12,6 @@ parameters: count: 1 path: ../../system/Config/DotEnv.php - - - message: '#^Assigning string directly on offset ''QUERY_STRING'' of \$_SERVER is discouraged\.$#' - count: 3 - path: ../../system/HTTP/IncomingRequest.php - - message: '#^Assigning ''http\://example\.com/'' directly on offset ''app\.baseURL'' of \$_SERVER is discouraged\.$#' count: 1 @@ -187,91 +182,6 @@ parameters: count: 1 path: ../../tests/system/HTTP/DownloadResponseTest.php - - - message: '#^Assigning '''' directly on offset ''QUERY_STRING'' of \$_SERVER is discouraged\.$#' - count: 1 - path: ../../tests/system/HTTP/IncomingRequestDetectingTest.php - - - - message: '#^Assigning ''/'' directly on offset ''REQUEST_URI'' of \$_SERVER is discouraged\.$#' - count: 1 - path: ../../tests/system/HTTP/IncomingRequestDetectingTest.php - - - - message: '#^Assigning ''/'' directly on offset ''SCRIPT_NAME'' of \$_SERVER is discouraged\.$#' - count: 1 - path: ../../tests/system/HTTP/IncomingRequestDetectingTest.php - - - - message: '#^Assigning ''/\?/ci/woot'' directly on offset ''REQUEST_URI'' of \$_SERVER is discouraged\.$#' - count: 1 - path: ../../tests/system/HTTP/IncomingRequestDetectingTest.php - - - - message: '#^Assigning ''/ci/index\.php'' directly on offset ''SCRIPT_NAME'' of \$_SERVER is discouraged\.$#' - count: 1 - path: ../../tests/system/HTTP/IncomingRequestDetectingTest.php - - - - message: '#^Assigning ''/ci/index\.php/popcorn/woot'' directly on offset ''REQUEST_URI'' of \$_SERVER is discouraged\.$#' - count: 1 - path: ../../tests/system/HTTP/IncomingRequestDetectingTest.php - - - - message: '#^Assigning ''/ci/woot'' directly on offset ''QUERY_STRING'' of \$_SERVER is discouraged\.$#' - count: 1 - path: ../../tests/system/HTTP/IncomingRequestDetectingTest.php - - - - message: '#^Assigning ''/ci/woot\?code\=good'' directly on offset ''QUERY_STRING'' of \$_SERVER is discouraged\.$#' - count: 1 - path: ../../tests/system/HTTP/IncomingRequestDetectingTest.php - - - - message: '#^Assigning ''/index\.php'' directly on offset ''SCRIPT_NAME'' of \$_SERVER is discouraged\.$#' - count: 11 - path: ../../tests/system/HTTP/IncomingRequestDetectingTest.php - - - - message: '#^Assigning ''/index\.php/woot'' directly on offset ''REQUEST_URI'' of \$_SERVER is discouraged\.$#' - count: 5 - path: ../../tests/system/HTTP/IncomingRequestDetectingTest.php - - - - message: '#^Assigning ''/index\.php/woot\?code\=good'' directly on offset ''REQUEST_URI'' of \$_SERVER is discouraged\.$#' - count: 1 - path: ../../tests/system/HTTP/IncomingRequestDetectingTest.php - - - - message: '#^Assigning ''/index\.php\?'' directly on offset ''REQUEST_URI'' of \$_SERVER is discouraged\.$#' - count: 1 - path: ../../tests/system/HTTP/IncomingRequestDetectingTest.php - - - - message: '#^Assigning ''/index\.php\?/ci/woot'' directly on offset ''REQUEST_URI'' of \$_SERVER is discouraged\.$#' - count: 1 - path: ../../tests/system/HTTP/IncomingRequestDetectingTest.php - - - - message: '#^Assigning ''/index\.php\?/ci/woot\?code\=good'' directly on offset ''REQUEST_URI'' of \$_SERVER is discouraged\.$#' - count: 1 - path: ../../tests/system/HTTP/IncomingRequestDetectingTest.php - - - - message: '#^Assigning ''/sub/example'' directly on offset ''REQUEST_URI'' of \$_SERVER is discouraged\.$#' - count: 1 - path: ../../tests/system/HTTP/IncomingRequestDetectingTest.php - - - - message: '#^Assigning ''/sub/index\.php'' directly on offset ''SCRIPT_NAME'' of \$_SERVER is discouraged\.$#' - count: 1 - path: ../../tests/system/HTTP/IncomingRequestDetectingTest.php - - - - message: '#^Assigning ''/woot'' directly on offset ''REQUEST_URI'' of \$_SERVER is discouraged\.$#' - count: 1 - path: ../../tests/system/HTTP/IncomingRequestDetectingTest.php - - message: '#^Assigning ''10\.0\.1\.200'' directly on offset ''REMOTE_ADDR'' of \$_SERVER is discouraged\.$#' count: 2 @@ -362,16 +272,6 @@ parameters: count: 1 path: ../../tests/system/HTTP/IncomingRequestTest.php - - - message: '#^Assigning mixed directly on offset ''REQUEST_URI'' of \$_SERVER is discouraged\.$#' - count: 1 - path: ../../tests/system/HTTP/IncomingRequestTest.php - - - - message: '#^Assigning mixed directly on offset ''SCRIPT_NAME'' of \$_SERVER is discouraged\.$#' - count: 1 - path: ../../tests/system/HTTP/IncomingRequestTest.php - - message: '#^Assigning ''GET'' directly on offset ''REQUEST_METHOD'' of \$_SERVER is discouraged\.$#' count: 1 diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index 50220a8e8989..f175a7113eb2 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -1,4 +1,4 @@ -# total 2708 errors +# total 2661 errors includes: - argument.type.neon diff --git a/utils/phpstan-baseline/missingType.iterableValue.neon b/utils/phpstan-baseline/missingType.iterableValue.neon index 9d944d2ed357..795c0ed3d034 100644 --- a/utils/phpstan-baseline/missingType.iterableValue.neon +++ b/utils/phpstan-baseline/missingType.iterableValue.neon @@ -1,4 +1,4 @@ -# total 1320 errors +# total 1319 errors parameters: ignoreErrors: @@ -5387,11 +5387,6 @@ parameters: count: 1 path: ../../tests/system/HTTP/IncomingRequestTest.php - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequestTest\:\:provideExtensionPHP\(\) return type has no value type specified in iterable type iterable\.$#' - count: 1 - path: ../../tests/system/HTTP/IncomingRequestTest.php - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequestTest\:\:provideIsHTTPMethods\(\) return type has no value type specified in iterable type iterable\.$#' count: 1 From 04820866a3d8700cdb5b1b47a31c0add21661bd3 Mon Sep 17 00:00:00 2001 From: michalsn Date: Sat, 20 Dec 2025 17:19:51 +0100 Subject: [PATCH 2/2] update user guide --- .../source/incoming/incomingrequest.rst | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/user_guide_src/source/incoming/incomingrequest.rst b/user_guide_src/source/incoming/incomingrequest.rst index e22c4ce37773..a96353dadfba 100644 --- a/user_guide_src/source/incoming/incomingrequest.rst +++ b/user_guide_src/source/incoming/incomingrequest.rst @@ -131,16 +131,6 @@ The ``getServer()`` method will pull from ``$_SERVER``. * ``$request->getServer()`` -getEnv() --------- - -.. deprecated:: 4.4.4 This method does not work from the beginning. Use - :php:func:`env()` instead. - -The ``getEnv()`` method will pull from ``$_ENV``. - -* ``$request->getEnv()`` - getPostGet() ------------ @@ -325,7 +315,6 @@ The methods provided by the parent classes that are available are: * :meth:`CodeIgniter\\HTTP\\Request::getMethod` * :meth:`CodeIgniter\\HTTP\\Request::setMethod` * :meth:`CodeIgniter\\HTTP\\Request::getServer` -* :meth:`CodeIgniter\\HTTP\\Request::getEnv` * :meth:`CodeIgniter\\HTTP\\Request::setGlobal` * :meth:`CodeIgniter\\HTTP\\Request::fetchGlobal` * :meth:`CodeIgniter\\HTTP\\Message::getBody` @@ -531,16 +520,3 @@ The methods provided by the parent classes that are available are: "current URI", since ``IncomingRequest::$uri`` might not be aware of the complete App configuration for base URLs. - .. php:method:: setPath($path) - - .. deprecated:: 4.4.0 - - :param string $path: The relative path to use as the current URI - :returns: This Incoming Request - :rtype: IncomingRequest - - .. note:: Prior to v4.4.0, used mostly just for testing purposes, this - allowed you to set the relative path value for the current request - instead of relying on URI detection. This also updated the - underlying ``URI`` instance with the new path. -