Skip to content

Commit 3affe3a

Browse files
committed
removed deprecated stuff & UserStorage
1 parent d64cbd4 commit 3affe3a

File tree

7 files changed

+1
-221
lines changed

7 files changed

+1
-221
lines changed

src/Bridges/HttpDI/SessionExtension.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function getConfigSchema(): Nette\Schema\Schema
3939
'expiration' => Expect::string()->dynamic(),
4040
'handler' => Expect::string()->dynamic(),
4141
'readAndClose' => Expect::bool(),
42-
'cookieSamesite' => Expect::anyOf(IResponse::SAME_SITE_LAX, IResponse::SAME_SITE_STRICT, IResponse::SAME_SITE_NONE, true)
42+
'cookieSamesite' => Expect::anyOf(IResponse::SAME_SITE_LAX, IResponse::SAME_SITE_STRICT, IResponse::SAME_SITE_NONE)
4343
->firstIsDefault(),
4444
])->otherItems('mixed');
4545
}
@@ -62,14 +62,6 @@ public function loadConfiguration()
6262
if (($config->cookieDomain ?? null) === 'domain') {
6363
$config->cookieDomain = $builder::literal('$this->getByType(Nette\Http\IRequest::class)->getUrl()->getDomain(2)');
6464
}
65-
if (isset($config->cookieSecure)) {
66-
trigger_error("The item 'session › cookieSecure' is deprecated, use 'http › cookieSecure' (it has default value 'auto').", E_USER_DEPRECATED);
67-
unset($config->cookieSecure);
68-
}
69-
if ($config->cookieSamesite === true) {
70-
trigger_error("In 'session › cookieSamesite' replace true with 'Lax'.", E_USER_DEPRECATED);
71-
$config->cookieSamesite = IResponse::SAME_SITE_LAX;
72-
}
7365
$this->compiler->addExportedType(Nette\Http\IRequest::class);
7466

7567
if ($this->debugMode && $config->debugger) {

src/Http/IResponse.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@
1616
*/
1717
interface IResponse
1818
{
19-
/** @deprecated */
20-
public const PERMANENT = 2116333333;
21-
22-
/** @deprecated */
23-
public const BROWSER = 0;
24-
2519
/** HTTP 1.1 response code */
2620
public const
2721
S100_CONTINUE = 100,

src/Http/Request.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ public function getQuery(string $key = null): mixed
107107
{
108108
if (func_num_args() === 0) {
109109
return $this->url->getQueryParameters();
110-
} elseif (func_num_args() > 1) {
111-
trigger_error(__METHOD__ . '() parameter $default is deprecated, use operator ??', E_USER_DEPRECATED);
112110
}
113111
return $this->url->getQueryParameter($key);
114112
}
@@ -122,8 +120,6 @@ public function getPost(string $key = null): mixed
122120
{
123121
if (func_num_args() === 0) {
124122
return $this->post;
125-
} elseif (func_num_args() > 1) {
126-
trigger_error(__METHOD__ . '() parameter $default is deprecated, use operator ??', E_USER_DEPRECATED);
127123
}
128124
return $this->post[$key] ?? null;
129125
}
@@ -154,9 +150,6 @@ public function getFiles(): array
154150
*/
155151
public function getCookie(string $key): mixed
156152
{
157-
if (func_num_args() > 1) {
158-
trigger_error(__METHOD__ . '() parameter $default is deprecated, use operator ??', E_USER_DEPRECATED);
159-
}
160153
return $this->cookies[$key] ?? null;
161154
}
162155

@@ -196,9 +189,6 @@ public function isMethod(string $method): bool
196189
*/
197190
public function getHeader(string $header): ?string
198191
{
199-
if (func_num_args() > 1) {
200-
trigger_error(__METHOD__ . '() parameter $default is deprecated, use operator ??', E_USER_DEPRECATED);
201-
}
202192
$header = strtolower($header);
203193
return $this->headers[$header] ?? null;
204194
}

src/Http/Response.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ final class Response implements IResponse
3131
/** Whether the cookie is available only through HTTPS */
3232
public bool $cookieSecure = false;
3333

34-
/** @deprecated */
35-
public $cookieHttpOnly;
36-
3734
/** Whether warn on possible problem with data in output buffer */
3835
public bool $warnOnBuffer = true;
3936

@@ -199,9 +196,6 @@ public function isSent(): bool
199196
*/
200197
public function getHeader(string $header): ?string
201198
{
202-
if (func_num_args() > 1) {
203-
trigger_error(__METHOD__ . '() parameter $default is deprecated, use operator ??', E_USER_DEPRECATED);
204-
}
205199
$header .= ':';
206200
$len = strlen($header);
207201
foreach (headers_list() as $item) {

src/Http/Session.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -448,14 +448,6 @@ public function setCookieParameters(
448448
}
449449

450450

451-
/** @deprecated */
452-
public function getCookieParameters(): array
453-
{
454-
trigger_error(__METHOD__ . '() is deprecated.', E_USER_DEPRECATED);
455-
return session_get_cookie_params();
456-
}
457-
458-
459451
/**
460452
* Sets path of the directory used to save session data.
461453
*/

src/Http/Url.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,6 @@ public function getQueryParameters(): array
221221

222222
public function getQueryParameter(string $name): mixed
223223
{
224-
if (func_num_args() > 1) {
225-
trigger_error(__METHOD__ . '() parameter $default is deprecated, use operator ??', E_USER_DEPRECATED);
226-
}
227224
return $this->query[$name] ?? null;
228225
}
229226

@@ -329,7 +326,6 @@ public function isEqual(string|self $url): bool
329326

330327
/**
331328
* Transforms URL to canonical form.
332-
* @deprecated
333329
*/
334330
public function canonicalize(): static
335331
{

src/Http/UserStorage.php

Lines changed: 0 additions & 178 deletions
This file was deleted.

0 commit comments

Comments
 (0)