Skip to content

Commit 190f630

Browse files
committed
Nette\Callback is deprecated
1 parent ae2102a commit 190f630

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Application/Routers/Route.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ public function __construct($mask, $metadata = [], $flags = 0)
121121
'action' => $a === strlen($metadata) - 1 ? NULL : substr($metadata, $a + 1),
122122
];
123123
} elseif ($metadata instanceof \Closure || $metadata instanceof Nette\Callback) {
124+
if ($metadata instanceof Nette\Callback) {
125+
trigger_error('Nette\Callback is deprecated, use Nette\Utils\Callback::toClosure().', E_USER_DEPRECATED);
126+
}
124127
$metadata = [
125128
self::PRESENTER_KEY => 'Nette:Micro',
126129
'callback' => $metadata,

0 commit comments

Comments
 (0)