Commit 36b879b3 authored by Dave Marshall's avatar Dave Marshall

Use addPrefix to avoid deprecated calls in >2.2.0

parent 9705ba7d
......@@ -364,7 +364,7 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
*/
public function flush($prefix = '')
{
$this['routes']->addCollection($this['controllers']->flush($prefix), $prefix);
$this['routes']->addCollection($this['controllers']->flush($prefix));
}
/**
......@@ -462,7 +462,7 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
throw new \LogicException('The "mount" method takes either a ControllerCollection or a ControllerProviderInterface instance.');
}
$this['routes']->addCollection($controllers->flush($prefix), $prefix);
$this['routes']->addCollection($controllers->flush($prefix));
return $this;
}
......
......@@ -148,6 +148,8 @@ class ControllerCollection
$controller->freeze();
}
$routes->addPrefix($prefix);
$this->controllers = array();
return $routes;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment