merged branch igorw/view-event-typehint (PR #7057)

This PR was merged into the 2.2 branch.

Commits
-------

06c26dc Remove array type hint from GetResponseForControllerResultEvent::setControllerResult()

Discussion
----------

Remove array type hint from GetResponseForControllerResultEvent::setControllerResult()

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

I don't see a good reason to limit responses to arrays. The method was introduced in 2.2, so there is no real BC break.

---------------------------------------------------------------------------

by stof at 2013-02-13T03:18:35Z

Indeed. SensioFrameworkExtraBundle handles the case where the result is an array, but in the case of FOSRestBundle, it is an object
This commit is contained in:
Fabien Potencier 2013-02-13 08:21:16 +01:00
commit b38ab51271

View File

@ -56,11 +56,11 @@ class GetResponseForControllerResultEvent extends GetResponseEvent
/**
* Assigns the return value of the controller.
*
* @param array The controller return value
* @param mixed The controller return value
*
* @api
*/
public function setControllerResult(array $controllerResult)
public function setControllerResult($controllerResult)
{
$this->controllerResult = $controllerResult;
}