Skip to content

Commit cbb0967

Browse files
committed
1 parent a841e1d commit cbb0967

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

system/HTTP/RequestTrait.php

+3
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,12 @@ public function getServer($index = null, $filter = null, $flags = null)
203203
* @param array|int|null $flags
204204
*
205205
* @return mixed
206+
*
207+
* @deprecated 4.4.4 This method does not work from the beginning. Use `env()`.
206208
*/
207209
public function getEnv($index = null, $filter = null, $flags = null)
208210
{
211+
// @phpstan-ignore-next-line
209212
return $this->fetchGlobal('env', $index, $filter, $flags);
210213
}
211214

user_guide_src/source/changelogs/v4.4.4.rst

+4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ Changes
4141
Deprecations
4242
************
4343

44+
- **Request:** The :php:meth:`CodeIgniter\\HTTP\\Request::getEnv()` method is
45+
deprecated. This method does not work from the beginning. Use :php:func:`env()`
46+
instead.
47+
4448
**********
4549
Bugs Fixed
4650
**********

user_guide_src/source/incoming/incomingrequest.rst

+3
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ The ``getServer()`` method will pull from ``$_SERVER``.
131131
getEnv()
132132
--------
133133

134+
.. deprecated:: 4.4.4 This method does not work from the beginning. Use
135+
:php:func:`env()` instead.
136+
134137
The ``getEnv()`` method will pull from ``$_ENV``.
135138

136139
* ``$request->getEnv()``

user_guide_src/source/incoming/request.rst

+3
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ Class Reference
107107

108108
.. php:method:: getEnv([$index = null[, $filter = null[, $flags = null]]])
109109
110+
.. deprecated:: 4.4.4 This method does not work from the beginning. Use
111+
:php:func:`env()` instead.
112+
110113
:param mixed $index: Value name
111114
:param int $filter: The type of filter to apply. A list of filters can be found in `PHP manual <https://www.php.net/manual/en/filter.filters.php>`__.
112115
:param int|array $flags: Flags to apply. A list of flags can be found in `PHP manual <https://www.php.net/manual/en/filter.filters.flags.php>`__.

0 commit comments

Comments
 (0)