Open weierophinney opened 4 years ago
I guess this is a typo or something that's never implemented. I've checked all routers and they all do this (including older versions):
public function addRoute(Route $route) : void
{
$this->routesToInject[] = $route;
}
I guess you can even call it a feature to add more routes after you matched a route already :)
And to be honest, why would you have that check? When adding a lot of routes it only creates overhead.
Originally posted by @geerteltink at https://github.com/zendframework/zend-expressive-fastroute/issues/60#issuecomment-425995923
So it'd be fine to remove this part of the docblock from zend-expressive?
Originally posted by @MatthiasKuehneEllerhold at https://github.com/zendframework/zend-expressive-fastroute/issues/60#issuecomment-426150070
The
Zend\Expressive\Router\RouterInface
states onaddRoute()
:But no RuntimeException will be thrown / raised.
Code to reproduce the issue
Expected results
A
Zend\Expressive\Router\Exception\RuntimeException
is thrown indicating that no routes may be added after callingmatch()
.Actual results
Scripts run without an exception.
Consequences
Is this a bug in the RouterInterface of "zend-expressive-router" or in the FastRouteRouter of this repo? (Same "error" (?) is in the "zend-expressive-zendrouter").
Originally posted by @MatthiasKuehneEllerhold at https://github.com/zendframework/zend-expressive-fastroute/issues/60