Routing issue with installation in a sub-directory
ref: https://github.com/symfony/symfony/issues/7129
This commit is contained in:
parent
ae5b94fd7c
commit
8d9cd42acd
@ -94,7 +94,7 @@ class Router extends BaseRouter implements WarmableInterface
|
||||
foreach ($route->getRequirements() as $name => $value) {
|
||||
$route->setRequirement($name, $this->resolveString($value));
|
||||
}
|
||||
|
||||
$collection->setPrefix('/'.ltrim($this->resolveString($collection->getPrefix()), '/'));
|
||||
$route->setPattern($this->resolveString($route->getPattern()));
|
||||
}
|
||||
}
|
||||
|
@ -259,6 +259,16 @@ class RouteCollection implements \IteratorAggregate, \Countable
|
||||
return $this->prefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the prefix (used to resolve placeholders).
|
||||
*
|
||||
* @param string The prefix
|
||||
*/
|
||||
public function setPrefix($prefix)
|
||||
{
|
||||
$this->prefix = $prefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of resources loaded to build this collection.
|
||||
*
|
||||
|
Reference in New Issue
Block a user