Skip to content

Commit 1f42133

Browse files
committed
Component: method checkRequirements() is called for createComponent<Name>() methods (BC break)
1 parent b943279 commit 1f42133

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Application/UI/Component.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ public function getUniqueId(): string
7474
protected function createComponent(string $name): ?Nette\ComponentModel\IComponent
7575
{
7676
if (method_exists($this, $method = 'createComponent' . $name)) {
77-
static::getReflection()->checkRequirements(new \ReflectionMethod($this, $method), $this->getPresenterIfExists());
77+
$rm = new \ReflectionMethod($this, $method);
78+
static::getReflection()->checkRequirements($rm, $this->getPresenterIfExists());
79+
$this->checkRequirements($rm);
7880
}
7981
$res = parent::createComponent($name);
8082
if ($res && !$res instanceof SignalReceiver && !$res instanceof StatePersistent) {

0 commit comments

Comments
 (0)