Skip to content

Commit 641b754

Browse files
committed
removed deprecated stuff
1 parent 3471bc2 commit 641b754

5 files changed

Lines changed: 0 additions & 23 deletions

File tree

phpstan.neon

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ parameters:
2121
count: 1
2222
path: src/Http/Request.php
2323

24-
- # $remoteHost kept in constructor signature for BC; unused since getRemoteHost() is deprecated and returns null
25-
message: '#^Constructor of class Nette\\Http\\Request has an unused parameter \$remoteHost\.$#'
26-
identifier: constructor.unusedParameter
27-
count: 1
28-
path: src/Http/Request.php
29-
3024
- # $_FILES may be undefined under non-standard SAPIs (CLI, custom request setup in tests)
3125
message: '#^Variable \$_FILES on left side of \?\? always exists and is not nullable\.$#'
3226
identifier: nullCoalesce.variable

src/Http/Helpers.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ final class Helpers
2222
/** @internal */
2323
public const StrictCookieName = '_nss';
2424

25-
/** @deprecated */
26-
public const STRICT_COOKIE_NAME = self::StrictCookieName;
27-
2825

2926
/**
3027
* Formats a date and time in the HTTP date format (RFC 7231), e.g. 'Mon, 23 Jan 1978 10:00:00 GMT'.

src/Http/IRequest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,6 @@ function isAjax(): bool;
128128
*/
129129
function getRemoteAddress(): ?string;
130130

131-
#[\Deprecated]
132-
function getRemoteHost(): ?string;
133-
134131
/**
135132
* Returns raw content of HTTP request body.
136133
*/

src/Http/Request.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
* @property-read bool $secured
2626
* @property-read bool $ajax
2727
* @property-read ?string $remoteAddress
28-
* @property-deprecated ?string $remoteHost
2928
* @property-read ?string $rawBody
3029
*/
3130
class Request implements IRequest
@@ -54,7 +53,6 @@ public function __construct(
5453
array $headers = [],
5554
private readonly string $method = 'GET',
5655
private readonly ?string $remoteAddress = null,
57-
?string $remoteHost = null,
5856
?callable $rawBodyCallback = null,
5957
) {
6058
$this->headers = array_change_key_case($headers);
@@ -291,14 +289,6 @@ public function getRemoteAddress(): ?string
291289
}
292290

293291

294-
#[\Deprecated]
295-
public function getRemoteHost(): ?string
296-
{
297-
trigger_error(__METHOD__ . '() is deprecated.', E_USER_DEPRECATED);
298-
return null;
299-
}
300-
301-
302292
/**
303293
* Returns raw content of HTTP request body.
304294
*/

src/Http/RequestFactory.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ public function fromGlobals(): Request
9292
$this->getHeaders(),
9393
$this->getMethod(),
9494
$remoteAddr,
95-
null,
9695
fn() => (string) file_get_contents('php://input'),
9796
);
9897
}

0 commit comments

Comments
 (0)