Skip to content

Commit

Permalink
Trigger a deprecation warning when an action implements UpdateHandler…
Browse files Browse the repository at this point in the history
…Interface
  • Loading branch information
viktorprogger committed Jul 24, 2024
1 parent d57f9df commit e13e476
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Router/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ public function handle(Update $update): ResponseInterface
private function resolveAction(Route $route, string $routeKey): Closure
{
if ($route->action instanceof UpdateHandlerInterface) {
trigger_deprecation('botasis/runtime', '0.12.0', 'Route actions implementing UpdateHandlerInterface are deprecated. Use Extended Callables syntax instead.');

return [$route->action, 'handle'](...);
}

Expand Down

0 comments on commit e13e476

Please sign in to comment.