Skip to content

Commit

Permalink
[FrameworkBundle] restricted to only URIs the first argument of the a…
Browse files Browse the repository at this point in the history
…ctions helper
  • Loading branch information
fabpot committed Dec 20, 2012
1 parent b7e4cff commit 3341c8e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
16 changes: 16 additions & 0 deletions UPGRADE-2.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,22 @@

### FrameworkBundle

* The `render` method of the `actions` templating helper signature and arguments changed:

Before:

```
<?php echo $view['actions']->render('BlogBundle:Post:list', array('limit' => 2), array('alt' => 'BlogBundle:Post:error')) ?>
```

After:

```
<?php echo $view['actions']->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
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,18 @@ public function __construct(HttpKernel $kernel)
}

/**
* 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);
}

/**
Expand Down

0 comments on commit 3341c8e

Please sign in to comment.