-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Make TemplateController working without the Templating component #21034
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
918c9d3
to
5ce9222
Compare
5ce9222
to
89ccbc4
Compare
Thank you @dunglas. |
…the Templating component (dunglas) This PR was merged into the 2.8 branch. Discussion ---------- [FrameworkBundle] Make TemplateController working without the Templating component | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a The template controller was missed during #15502. Btw I've added some tests for this controller. Commits ------- 89ccbc4 [FrameworkBundle] Make TemplateController working without the Templating component
@@ -33,8 +33,14 @@ class TemplateController extends ContainerAware | |||
*/ | |||
public function templateAction($template, $maxAge = null, $sharedAge = null, $private = null) | |||
{ | |||
/** @var $response \Symfony\Component\HttpFoundation\Response */ | |||
$response = $this->container->get('templating')->renderResponse($template); | |||
/* @var $response \Symfony\Component\HttpFoundation\Response */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dunglas Are you sure about this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would even remove it as I don't think it helps in any way, does it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing it would indeed be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in e5ce4c9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was to make fabbot green, I've tried with PHPStorm, both formats enable the autocompletion. Removing it prevent autocompletion by default, but if you have the Symfony plugin then it works.
The template controller was missed during #15502. Btw I've added some tests for this controller.