Skip to content

Commit 94c20b7

Browse files
committed
used nette/schema 1.2
1 parent 6e26255 commit 94c20b7

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"conflict": {
2929
"nette/di": "<3.0.3",
30-
"nette/schema": "<1.1"
30+
"nette/schema": "<1.2"
3131
},
3232
"suggest": {
3333
"ext-fileinfo": "to detect type of uploaded files"

src/Bridges/HttpDI/HttpExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct(bool $cliMode = false)
3131
public function getConfigSchema(): Nette\Schema\Schema
3232
{
3333
return Expect::structure([
34-
'proxy' => Expect::anyOf(Expect::arrayOf('string'), Expect::string()->castTo('array'))->default([])->dynamic(),
34+
'proxy' => Expect::anyOf(Expect::arrayOf('string'), Expect::string()->castTo('array'))->firstIsDefault()->dynamic(),
3535
'headers' => Expect::arrayOf('scalar|null')->default([
3636
'X-Powered-By' => 'Nette Framework 3',
3737
'Content-Type' => 'text/html; charset=utf-8',
@@ -42,7 +42,7 @@ public function getConfigSchema(): Nette\Schema\Schema
4242
'featurePolicy' => Expect::arrayOf('array|scalar|null'), // Feature-Policy
4343
'cookiePath' => Expect::string(),
4444
'cookieDomain' => Expect::string(),
45-
'cookieSecure' => Expect::anyOf(null, true, false, 'auto')->default('auto'), // Whether the cookie is available only through HTTPS
45+
'cookieSecure' => Expect::anyOf('auto', null, true, false)->firstIsDefault(), // Whether the cookie is available only through HTTPS
4646
]);
4747
}
4848

src/Bridges/HttpDI/SessionExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ public function getConfigSchema(): Nette\Schema\Schema
3737
{
3838
return Expect::structure([
3939
'debugger' => Expect::bool(false),
40-
'autoStart' => Expect::anyOf('smart', true, false)->default('smart'),
40+
'autoStart' => Expect::anyOf('smart', true, false)->firstIsDefault(),
4141
'expiration' => Expect::string()->dynamic(),
4242
'handler' => Expect::string()->dynamic(),
4343
'readAndClose' => Expect::bool(),
4444
'cookieSamesite' => Expect::anyOf(IResponse::SAME_SITE_LAX, IResponse::SAME_SITE_STRICT, IResponse::SAME_SITE_NONE, true)
45-
->default(IResponse::SAME_SITE_LAX),
45+
->firstIsDefault(),
4646
])->otherItems('mixed');
4747
}
4848

0 commit comments

Comments
 (0)