Skip to content

Commit

Permalink
Merge pull request #29 from xificurk/nette-reflection
Browse files Browse the repository at this point in the history
Drop abandoned nette/reflection dependency
  • Loading branch information
hrach authored Jun 18, 2020
2 parents e81e15f + 133a187 commit a99a7e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/SecuredLinksControlTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a99a7e5

Please sign in to comment.