Skip to content

Commit 31bbfdb

Browse files
committed
Revert "SecurityExtension: 'roles' & 'resources' are deprecated"
This reverts commit cbd4e8c.
1 parent 12df4f1 commit 31bbfdb

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
"phpstan/phpstan-nette": "^0.12"
2727
},
2828
"conflict": {
29-
"nette/di": "<3.0-stable",
30-
"nette/schema": "<1.1"
29+
"nette/di": "<3.0-stable"
3130
},
3231
"autoload": {
3332
"classmap": ["src/"]

src/Bridges/SecurityDI/SecurityExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public function getConfigSchema(): Nette\Schema\Schema
4242
])->castTo('array')
4343
)
4444
),
45-
'roles' => Expect::arrayOf('string|array|null')->deprecated(), // role => parent(s)
46-
'resources' => Expect::arrayOf('string|null')->deprecated(), // resource => parent
45+
'roles' => Expect::arrayOf('string|array|null'), // role => parent(s)
46+
'resources' => Expect::arrayOf('string|null'), // resource => parent
4747
'authentication' => Expect::structure([
4848
'storage' => Expect::anyOf('session', 'cookie')->default('session'),
4949
'expiration' => Expect::string()->dynamic(),

tests/Security.DI/SecurityExtension.authorizator.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ security:
3232
article: item
3333
', 'neon'));
3434

35-
@eval($compiler->addConfig($config)->compile()); // @ is deprecated
35+
eval($compiler->addConfig($config)->compile());
3636
$container = new Container;
3737

3838
$authorizator = $container->getService('security.authorizator');

0 commit comments

Comments
 (0)