From 598915a66290d04638ddc44831739e88eb74d47f Mon Sep 17 00:00:00 2001 From: David Grudl Date: Wed, 24 Oct 2018 18:28:52 +0200 Subject: [PATCH] updated for nette/di 3 --- composer.json | 2 +- src/Bridges/SecurityDI/SecurityExtension.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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..c070b6b3 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')) @@ -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) {