diff --git a/src/Application/UI/Presenter.php b/src/Application/UI/Presenter.php index 54ed0b104..d5c58a58f 100644 --- a/src/Application/UI/Presenter.php +++ b/src/Application/UI/Presenter.php @@ -1301,11 +1301,12 @@ final public function injectPrimary(?Nette\DI\Container $context, ?Application\I * Gets the context. * @deprecated */ - final public function getContext(): Nette\DI\Container + public function getContext(): Nette\DI\Container { if (!$this->context) { throw new Nette\InvalidStateException('Context has not been set.'); } + trigger_error(__METHOD__ . '() is deprecated, use dependency injection.', E_USER_DEPRECATED); return $this->context; }