Skip to content

Commit 1834e18

Browse files
committed
Presenter::getContext() triggers deprecation notice
1 parent fe4d27a commit 1834e18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Application/UI/Presenter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
* @property string $view
2525
* @property string|bool $layout
2626
* @property-read \stdClass $payload
27-
* @property-read Nette\DI\Container $context
2827
* @property-read Nette\Http\Session $session
2928
* @property-read Nette\Security\User $user
3029
*/
@@ -1290,6 +1289,7 @@ final public function getContext(): Nette\DI\Container
12901289
if (!$this->context) {
12911290
throw new Nette\InvalidStateException('Context has not been set.');
12921291
}
1292+
trigger_error(__METHOD__ . '() is deprecated, use Dependency Injection.', E_USER_DEPRECATED);
12931293
return $this->context;
12941294
}
12951295

0 commit comments

Comments
 (0)