Skip to content

Commit 6ecccf3

Browse files
committed
Component: method checkRequirements() is called for createComponent<Name>() methods (BC break)
1 parent 785c965 commit 6ecccf3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Application/UI/Component.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ public function getUniqueId(): string
7575
protected function createComponent(string $name): ?Nette\ComponentModel\IComponent
7676
{
7777
if (method_exists($this, $method = 'createComponent' . $name)) {
78-
(new AccessPolicy($this, new \ReflectionMethod($this, $method)))->checkAccess();
78+
(new AccessPolicy($this, $rm = new \ReflectionMethod($this, $method)))->checkAccess();
79+
$this->checkRequirements($rm);
7980
}
8081
$res = parent::createComponent($name);
8182
if ($res && !$res instanceof SignalReceiver && !$res instanceof StatePersistent) {

0 commit comments

Comments
 (0)