Skip to content

Commit 20725ec

Browse files
committed
Component: method checkRequirements() is called for createComponent<Name>() methods (BC break)
1 parent 0f1616a commit 20725ec

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
@@ -74,7 +74,8 @@ public function getUniqueId(): string
7474
protected function createComponent(string $name): ?Nette\ComponentModel\IComponent
7575
{
7676
if (method_exists($this, $method = 'createComponent' . $name)) {
77-
(new AccessPolicy($this, new \ReflectionMethod($this, $method)))->checkAccess();
77+
(new AccessPolicy($this, $rm = new \ReflectionMethod($this, $method)))->checkAccess();
78+
$this->checkRequirements($rm);
7879
}
7980
$res = parent::createComponent($name);
8081
if ($res && !$res instanceof SignalReceiver && !$res instanceof StatePersistent) {

0 commit comments

Comments
 (0)