Dependency updates and update version number

This commit is contained in:
Kode
2018-06-13 19:35:28 +01:00
parent 18ec208381
commit e3ec7de23a
1261 changed files with 45582 additions and 29687 deletions

View File

@@ -76,7 +76,7 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface
return $ret;
}
if (0 === count($this->routes) && '/' === $pathinfo) {
if ('/' === $pathinfo && !$this->allow) {
throw new NoConfigurationException();
}
@@ -135,6 +135,12 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface
continue;
}
$status = $this->handleRouteRequirements($pathinfo, $name, $route);
if (self::REQUIREMENT_MISMATCH === $status[0]) {
continue;
}
// check HTTP method requirement
if ($requiredMethods = $route->getMethods()) {
// HEAD and GET are equivalent as per RFC
@@ -143,18 +149,14 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface
}
if (!in_array($method, $requiredMethods)) {
$this->allow = array_merge($this->allow, $requiredMethods);
if (self::REQUIREMENT_MATCH === $status[0]) {
$this->allow = array_merge($this->allow, $requiredMethods);
}
continue;
}
}
$status = $this->handleRouteRequirements($pathinfo, $name, $route);
if (self::REQUIREMENT_MISMATCH === $status[0]) {
continue;
}
return $this->getAttributes($route, $name, array_replace($matches, $hostMatches, isset($status[1]) ? $status[1] : array()));
}
}