Commit b77b5f26 authored by Fabien Potencier's avatar Fabien Potencier

merged branch davedevelopment/mount-with-prefix (PR #643)

This PR was merged into the master branch.

Commits
-------

36b879b3 Use addPrefix to avoid deprecated calls in >2.2.0

Discussion
----------

Use addPrefix to avoid deprecated calls in >2.2.0

I think this should take care of #642
parents 9705ba7d 36b879b3
......@@ -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