From 133a187b6a2f6b5dfded0c5741d65ba66692fa9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mor=C3=A1vek?= Date: Thu, 18 Jun 2020 13:32:50 +0200 Subject: [PATCH] Drop abandoned nette/reflection dependency --- composer.json | 3 +-- src/SecuredLinksControlTrait.php | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 16f7dad..35f32b4 100644 --- a/composer.json +++ b/composer.json @@ -13,8 +13,7 @@ "require": { "php": "^7.1", "nette/application": "^3.0.3", - "nette/utils": "^3.0", - "nette/reflection": "^2.4" + "nette/utils": "^3.0" }, "require-dev": { "nette/tester": "^2.2", diff --git a/src/SecuredLinksControlTrait.php b/src/SecuredLinksControlTrait.php index 093e586..219e153 100644 --- a/src/SecuredLinksControlTrait.php +++ b/src/SecuredLinksControlTrait.php @@ -41,8 +41,8 @@ public function signalReceived(string $signal): void $secured = FALSE; if (method_exists($this, $method)) { - $reflection = new Nette\Reflection\Method($this, $method); - $secured = $reflection->hasAnnotation('secured'); + $reflection = new \ReflectionMethod($this, $method); + $secured = Nette\Application\UI\ComponentReflection::parseAnnotation($reflection, 'secured') !== NULL; if ($secured) { $params = array($this->getUniqueId()); if ($this->params) {