merged branch DHorchler/2.1 (PR #7193)
This PR was merged into the 2.1 branch.
Discussion
----------
Routing issue with installation in a sub-directory
ref: https://github.com/symfony/symfony/issues/7129
Commits
-------
8d9cd42
Routing issue with installation in a sub-directory ref: https://github.com/symfony/symfony/issues/7129
This commit is contained in:
commit
8ae7d98569
|
@ -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