diff --git a/UPGRADE-2.2.md b/UPGRADE-2.2.md index 7bbce168b5..8ad717e8bd 100644 --- a/UPGRADE-2.2.md +++ b/UPGRADE-2.2.md @@ -364,6 +364,22 @@ ### FrameworkBundle + * The `render` method of the `actions` templating helper signature and arguments changed: + + Before: + + ``` + render('BlogBundle:Post:list', array('limit' => 2), array('alt' => 'BlogBundle:Post:error')) ?> + ``` + + After: + + ``` + render($view['router']->generate('post_list', array('limit' => 2)), array('alt' => 'BlogBundle:Post:error')) ?> + ``` + + where `post_list` is the route name for the `BlogBundle:Post:list` controller. + #### Configuration * The 2.2 version introduces a new parameter `trusted_proxies` that replaces diff --git a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md index edca8d858e..af67c70ea2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md +++ b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md @@ -8,6 +8,7 @@ CHANGELOG * `Symfony\Bundle\FrameworkBundle\HttpKernel::render()` method signature changed and the first argument must now be a URI (the `generateInternalUri()` method was removed) * The internal routes have been removed (`Resources/config/routing/internal.xml`) + * The `render` method of the `actions` templating helper signature and arguments changed: * replaced Symfony\Bundle\FrameworkBundle\Controller\TraceableControllerResolver by Symfony\Component\HttpKernel\Controller\TraceableControllerResolver * replaced Symfony\Component\HttpKernel\Debug\ContainerAwareTraceableEventDispatcher by Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher * added Client::enableProfiler() diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php index 8e9781f728..a4fdc3510e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/ActionsHelper.php @@ -34,21 +34,18 @@ class ActionsHelper extends Helper } /** - * Returns the Response content for a given controller or URI. + * Returns the Response content for a given URI. * - * @param string $controller A controller name to execute (a string like BlogBundle:Post:index), or a relative URI - * @param array $attributes An array of request attributes - * @param array $options An array of options + * @param string $uri A URI + * @param array $options An array of options * * @return string * * @see Symfony\Bundle\FrameworkBundle\HttpKernel::render() */ - public function render($controller, array $attributes = array(), array $options = array()) + public function render($uri, array $options = array()) { - $options['attributes'] = $attributes; - - return $this->kernel->render($controller, $options); + return $this->kernel->render($uri, $options); } /**