Permalink
Browse files

Presenter::getContext() triggers deprecation notice

  • Loading branch information...
dg committed Feb 5, 2019
1 parent fe4d27a commit 1834e18f16e18c56a71d4e5acfbec67b1b0cc650
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Application/UI/Presenter.php
@@ -24,7 +24,6 @@
* @property string $view
* @property string|bool $layout
* @property-read \stdClass $payload
* @property-read Nette\DI\Container $context
* @property-read Nette\Http\Session $session
* @property-read Nette\Security\User $user
*/
@@ -1290,6 +1289,7 @@ public function getFlashSession(): Http\SessionSection
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;
}

0 comments on commit 1834e18

Please sign in to comment.