Merge branch '4.4'
This commit is contained in:
commit
cf8cfebd5e
|
@ -140,6 +140,10 @@ class RouteCollection implements \IteratorAggregate, \Countable
|
|||
*/
|
||||
public function addPrefix($prefix, array $defaults = [], array $requirements = [])
|
||||
{
|
||||
if (null === $prefix) {
|
||||
@trigger_error(sprintf('Passing null as $prefix to %s is deprecated in Symfony 4.4 and will trigger a TypeError in 5.0.', __METHOD__), E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
$prefix = trim(trim($prefix), '/');
|
||||
|
||||
if ('' === $prefix) {
|
||||
|
|
|
@ -309,7 +309,9 @@ class RouteCollectionBuilder
|
|||
} else {
|
||||
/* @var self $route */
|
||||
$subCollection = $route->build();
|
||||
$subCollection->addPrefix($this->prefix);
|
||||
if (null !== $this->prefix) {
|
||||
$subCollection->addPrefix($this->prefix);
|
||||
}
|
||||
|
||||
$routeCollection->addCollection($subCollection);
|
||||
}
|
||||
|
|
Reference in New Issue