diff --git a/composer.json b/composer.json index 6efb5f48..5eeed41e 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "nette/utils": "^2.4 || ^3.0" }, "require-dev": { - "nette/di": "^2.4 || ^3.0", + "nette/di": "^3.0.0-beta1", "nette/http": "^3.0.0-beta", "nette/tester": "^2.0", "tracy/tracy": "^2.4" diff --git a/src/Bridges/SecurityDI/SecurityExtension.php b/src/Bridges/SecurityDI/SecurityExtension.php index 2ec9b534..a265f94e 100644 --- a/src/Bridges/SecurityDI/SecurityExtension.php +++ b/src/Bridges/SecurityDI/SecurityExtension.php @@ -43,7 +43,7 @@ public function loadConfiguration() ->setFactory(Nette\Security\Passwords::class); $builder->addDefinition($this->prefix('userStorage')) - ->setClass(Nette\Security\IUserStorage::class) + ->setType(Nette\Security\IUserStorage::class) ->setFactory(Nette\Http\UserStorage::class); $user = $builder->addDefinition($this->prefix('user')) @@ -51,7 +51,7 @@ public function loadConfiguration() if ($this->debugMode && $config['debugger']) { $user->addSetup('@Tracy\Bar::addPanel', [ - new Nette\DI\Statement(Nette\Bridges\SecurityTracy\UserPanel::class), + new Nette\DI\Definitions\Statement(Nette\Bridges\SecurityTracy\UserPanel::class), ]); } @@ -65,7 +65,7 @@ public function loadConfiguration() } $builder->addDefinition($this->prefix('authenticator')) - ->setClass(Nette\Security\IAuthenticator::class) + ->setType(Nette\Security\IAuthenticator::class) ->setFactory(Nette\Security\SimpleAuthenticator::class, [$usersList, $usersRoles]); if ($this->name === 'security') { @@ -75,7 +75,7 @@ public function loadConfiguration() if ($config['roles'] || $config['resources']) { $authorizator = $builder->addDefinition($this->prefix('authorizator')) - ->setClass(Nette\Security\IAuthorizator::class) + ->setType(Nette\Security\IAuthorizator::class) ->setFactory(Nette\Security\Permission::class); foreach ($config['roles'] as $role => $parents) {