You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to \Yiisoft\Router\CurrentRoute doesn't have any restrictions it may be created with $container->get(), but it has whole empty state:
It's unexpected and cause lots of if's over it.
Isn't it better to add RouteProvider with the getCurrent() method that will return either CurrentRoute or Route or throw an exception because it wasn't set before?
The text was updated successfully, but these errors were encountered:
Due to
\Yiisoft\Router\CurrentRoute
doesn't have any restrictions it may be created with$container->get()
, but it has whole empty state:It's unexpected and cause lots of
if
's over it.Isn't it better to add RouteProvider with the
getCurrent()
method that will return either CurrentRoute or Route or throw an exception because it wasn't set before?The text was updated successfully, but these errors were encountered: