8000 merged branch zachbadgett/framework_bundle_delegating_engine (PR #4824) · defrag/symfony@2c6b825 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2c6b825

Browse files
committed
merged branch zachbadgett/framework_bundle_delegating_engine (PR symfony#4824)
Commits ------- 2fa98e8 [FrameworkBundle] Changed DelegatingEngine::renderResponse to use specified engine's renderResponse Discussion ---------- [FrameworkBundle] Changed DelegatingEngine::renderResponse to use specified engine's renderResponse Currently the DelegatingEngine in the FrameworkBundle has a renderResponse method that creates a new response, it should use the engine's renderResponse since EngineInterface requires a renderResponse to be defined and gives more flexibly to change the response object when creating a new templating engine. Bug fix: no Feature addition: yes Backwards compatibility break: no Symfony2 tests pass: yes Fixes the following tickets: - Todo: - License of the code: MIT Documentation PR: -
2 parents 4bab36b + 2fa98e8 commit 2c6b825

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/Symfony/Bundle/FrameworkBundle/Templating/DelegatingEngine.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,6 @@ protected function getEngine($name)
8484
*/
8585
public function renderResponse($view, array $parameters = array(), Response $response = null)
8686
{
87-
if (null === $response) {
88-
$response = new Response();
89-
}
90-
91-
$response->setContent($this->render($view, $parameters));
92-
93-
return $response;
87+
return $this->getEngine($view)->renderResponse($view, $parameters, $response);
9488
}
9589
}

0 commit comments

Comments
 (0)
0